miniBB Support Forums
|
Forums
|
Register
|
Reply
|
Search
|
Statistics
|
Manual
|
miniBB Support Forums
/
Master Class
/
UTC Time in the Database
hugh
Registered
#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
Team
#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.
hugh
Registered
#3
|
Posted: 17 May 2004 18:33
|
Edited by: hugh
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().
hugh
Registered
#4
|
Posted: 17 May 2004 19:06
|
Edited by: hugh
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?
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.
hugh
Registered
#6
|
Posted: 18 May 2004 01:15
Thanks very much. I'll try it.
miniBB Support Forums
/
Master Class
/ UTC Time in the Database
↑
Top
Your Reply
Short link for this topic:
?
You are welcome to post anonymously, by entering a nickname with no password (if the similar Username has not been taken yet), or by leaving both fields empty. If you have a forums account, you can also sign in from this page without posting a message, or sign in and post at once.
Before posting, make sure your message is compliant with our
forum posting rules
. If not, it may be locked or deleted with no explanation.
News & Announcements
FAQ
How To
Bugs
The Other
Official Addons and Solutions
Custom Tutorials and Modifications
Master Class
Specific
Re-cycled
Suggestions
Testimonials
qwerty
Features
Requirements
Demo
Download
Showcase
Gallery of Arts
Compiler
Premium Extensions
Premium Support
License
Contacts
Did you know that you may be allowed to hide miniBB credits
and
remove miniBB's copyright notice
?