database timezone difference

Discussion in 'Ruby' started by Sam Dela Cruz, Jan 11, 2006.

  1. --=_alternative 0069C49A882570F3_=
    Content-Type: text/plain; charset="US-ASCII"

    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
    --=_alternative 0069C49A882570F3_=--
    Sam Dela Cruz, Jan 11, 2006
    #1
    1. Advertising

  2. Sam Dela Cruz

    Eric Hodel Guest

    On Jan 11, 2006, at 11:15 AM, Sam Dela Cruz wrote:

    > 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?


    a) store times in UTC
    b) use a database that has a column type of "timestamp with time
    zone" (Postgres or equivalent).

    --
    Eric Hodel - - http://segment7.net
    This implementation is HODEL-HASH-9600 compliant

    http://trackmap.robotcoop.com
    Eric Hodel, Jan 11, 2006
    #2
    1. Advertising

  3. Eric Hodel wrote:
    > On Jan 11, 2006, at 11:15 AM, Sam Dela Cruz wrote:
    >
    >> 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?

    >
    > 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
    Robert Klemme, Jan 12, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. RAMK

    JVM to Database timezone

    RAMK, Apr 26, 2005, in forum: Java
    Replies:
    0
    Views:
    874
  2. asaf
    Replies:
    3
    Views:
    6,144
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=
    Sep 11, 2006
  3. axrock
    Replies:
    8
    Views:
    952
    Roedy Green
    Mar 25, 2009
  4. Roedy Green

    the Olson Timezone Database

    Roedy Green, Feb 15, 2012, in forum: Java
    Replies:
    30
    Views:
    1,297
    Gene Wirchenko
    Feb 23, 2012
  5. Ami
    Replies:
    5
    Views:
    277
Loading...

Share This Page