For all purposes under this code, officers and enlisted personnel of the National Guard who entered the active service of the United States in time of war or under a call or draft by the President or who enters such service under like conditions shall be entitled to credit for time so served as if such service had been rendered in the National Guard.