PDA

View Full Version : System Get Date Time bug?


kraigyb
09-04-2003, 03:11 PM
I just came across this problem while playing with the System.GetDateTime function. If you get the Time with AM/PM format, 12:00PM - 12:59PM displays as AM. Also, 12:00AM - 12:59AM displays as 0:mmAM. Bug or am I not doing something right? I'm using v4.0.0.4 on Windows XP.

Derek
09-04-2003, 03:24 PM
I think that should be 12:00pm - 11:59pm /ubbthreads/images/icons/smile.gif

Current time here is 21:03 and it seems to work fine displaying as 9:03:23PM

Have you anything else going on that may be effecting it?

Here is what I used:

%Date% = System.GetDateTime ( "Time", "AM/PM Time")
%Result% = Dialog.MessageBox ("Title", "%Date%", Ok, Question)

kraigyb
09-04-2003, 03:32 PM
It only displays wrong between 12pm (noon) and 12:59pm, and 12am (midnight) and 12:59am. Set your clock to one of those times and see.

Derek
09-04-2003, 03:34 PM
Ah! I see .. sorry, i misread /ubbthreads/images/icons/smile.gif

cdemallie
09-05-2003, 05:46 AM
Yup. This bug has already been confirmed and added to the appropriate bugfix database. You can get around this by retrieving the military time and then using a series of if/then and search/replace actions to convert the result to standard time. I did this at first, but then decided to just stick with military time. The "old school" programmer in me just couldn't stand having the "extra" code in my project.

Craig