Forum BigDB Server Date and Time

Discussion and help relating to the PlayerIO database solution, BigDB.

Server Date and Time

Postby stevewoolcock » October 6th, 2011, 12:40 am

Hey guys,

I just wanted to check with the devs to make sure that the date/time on all the servers is set to 12 or 24 hours time. I had some server-side scripts that were working fine for weeks, and then this morning I started getting date/time errors. When I checked the server time, it was reporting back in 24 hour time - and all my client/server code was set to work with 12 hour time, which was because previously it had all been set to 12 hour. The actual times themselves were correct, just in the wrong format.

There is every chance this was a small oversight on my behalf and timezones might have been screwing with my perception (I'm in Australia). Just wanted to double check that all servers are set to the same system!
stevewoolcock
 
Posts: 7
Joined: August 9th, 2011, 2:36 pm

Re: Server Date and Time

Postby Henrik » October 6th, 2011, 9:30 pm

What do you mean with 12-hours time?

When you get the current time in your serverside code through DateTime.Now, you should get a DateTime object with the current date and time, and the timezone set to UTC. The .Hour property on that object is always a number between 0 and 23.
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Server Date and Time

Postby stevewoolcock » October 9th, 2011, 11:48 pm

I think this might have just been an oversight on my behalf. I could have sworn I was getting the hours returned in 12 hour time (with AM/PM) a while ago, but I'm starting to think it has come down to a lack of proper testing by myself. Thanks for the reply, good to know everything is in 24 hour time (as you would expect!).
stevewoolcock
 
Posts: 7
Joined: August 9th, 2011, 2:36 pm

Re: Server Date and Time

Postby Henrik » October 10th, 2011, 9:34 am

12:00 to 21:00 in Australia is 01:00 to 10:00 UTC, so if you only developed and tested during late office hours, you'd only see numbers from 1 to 10. Maybe that was it? :-)
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: Server Date and Time

Postby stevewoolcock » October 11th, 2011, 3:40 am

I think that's what the problem was. Everything looked OK until testing in the morning, so it's quite possible that's what the problem was. All seems well now! Thanks for the replies.
stevewoolcock
 
Posts: 7
Joined: August 9th, 2011, 2:36 pm


Return to BigDB