If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Timestamps and Internationalization

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-27-10, 02:03
Al_RelEZ_Al Al_RelEZ_Al is offline
Registered User
 
Join Date: Aug 2010
Location: Sydney
Posts: 15
Timestamps and Internationalization

Hi everyone,

This thread isn't isolated to only MySQL, but I thought I might as well raise it here as I am using MySQL for this issue.
I am finding internationalization and timezone settings quite a tricky thing to overcome with application development.

Consider this...
I KNOW MySQL stores timestamps as UTC/GMT. But when it retrieves it, it converts it depending on the locale of the queryer (correct?)

Now...
1) What if I want to create an INSERT SQL statement for my database but I want treat the DB as though it is located at GMT. How do I format my timestamp to store the data as GMT format?
2) I am located at GMT+10, and I am finding that my epoch on Java time is '1970-01-01 10:00:00', which is what I seem to HAVE to insert into my database in order to store epoch time
3) But if I were to transfer my entire application, with the SQL script etc off to a friend over in the UK, they will get a time that is 10 hours ahead of epoch when I actually wanted them to get the epoch itself.

Anyone know how I can resolve this?

Cheers,
Al_REL-EZ_Al
Reply With Quote
Reply

Tags
epoch, timestamp

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On