miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Master Class miniBB Support Forums / Master Class /  
 

UTC Time in the Database

 
Author hugh
Partaker
#1 | Posted: 17 May 2004 16:33 
I wonder if it's possible to put "post_time" into the database as UTC (ie, GMT) instead of the server local time. I should think it would be, as the sever can certainly give the time as UTC. I know it's possible to adjust the displayed time on the page but I would like to have UTC in the database to avoid problems with "daylight saving" etc.

Can you give me any clues on how to investigate this? Where in MiniBB code is the time put into the database?

Thanks

Author Team
8-)
#2 | Posted: 17 May 2004 17:14 
Actually, I don't know what "daylight saving" problem could be - if you mean that you need to insert user's time, not server time, than this is probably not the best idea... Somebody can make a post in US, and then somebody can answer in Europe - and his answer could be "earlier". Actually, you need to change some requests in setup_mysql module, inserting not "now()" statement, but making JavaScript time on the page and posting it somewhere as hidden field.

Author hugh
Partaker
#3 | Posted: 17 May 2004 18:33 
By "daylight saving problem" I mean when the server goes to local "summer time" on a different day from the timezone the forum is using.

I definetely do not mean to insert user's time, I mean to insert UTC - for every post.

Anyway, thanks for your answer, I'll have to do some research and see if there is a UTC version of now().

Author hugh
Partaker
#4 | Posted: 17 May 2004 19:06 
here's a page with some interesting information. Would I have to replace every instance of NOW() with UTC_DATE() and UTC_TIME()? If so, what would the syntax be?

Author Sergei
Team member
#5 | Posted: 18 May 2004 01:06 
should be like: DATETIME('UTC_DATE() UTC_TIME()') instead of single now() then. you can try ;) i think it works only in newest mysql versions, won't work in older ones..

Still, we don't recommend to change anything. miniBB has all internal routines for handling time zones for specific users; the date format we use is the universal one. It works on all systems.

Author hugh
Partaker
#6 | Posted: 18 May 2004 01:15 
Thanks very much. I'll try it.

Master Class miniBB Support Forums / Master Class /
 UTC Time in the Database
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Install the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑