Forum: Ruby database timezone difference

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Sam Dela C. (Guest)
on 2006-01-11 21:16
(Received via mailing list)
Hi,

I'm pulling data from a database in Europe and saving a dataset in North
America database.  Included in the data are DateTime information.
Because
the timezones are different, when I pull the data it gets translated to
local timezone.  Locally, in North America, I need to process reports
based on dates, and I need to have a report exactly as if it came from
European database.  How do I preserve the date in European timezone
before
being uploaded to North American db?

Regards,
Sam
Eric H. (Guest)
on 2006-01-11 23:52
(Received via mailing list)
On Jan 11, 2006, at 11:15 AM, Sam Dela C. wrote:

> being uploaded to North American db?
a) store times in UTC
b) use a database that has a column type of "timestamp with time
zone" (Postgres or equivalent).

--
Eric H. - removed_email_address@domain.invalid - http://segment7.net
This implementation is HODEL-HASH-9600 compliant

http://trackmap.robotcoop.com
Robert K. (Guest)
on 2006-01-12 13:16
(Received via mailing list)
Eric H. wrote:
>> from European database.  How do I preserve the date in European
>> timezone before
>> being uploaded to North American db?
>
> a) store times in UTC
> b) use a database that has a column type of "timestamp with time
> zone" (Postgres or equivalent).

In Oracle it's called "TIMESTAMP WITH LOCAL TIMEZONE" - values are
converted to the sessions timezone on retrieval.  This is in Oracle 9
and
newer.  Oracle's "Globalization Support Guide" is a good reading on the
matter.

HTH

    robert
This topic is locked and can not be replied to.