gmtime

Discussion in 'Python' started by gazza, Jan 31, 2010.

  1. gazza

    gazza Guest

    Hi,

    I am trying to discover how to obtain the correct time of say CST/
    America and EST/America in python?

    Any help on this would be appreciated.


    Thanks,
    Garyc
     
    gazza, Jan 31, 2010
    #1
    1. Advertising

  2. gazza

    gazza Guest

    On Jan 31, 3:27 pm, gazza <> wrote:
    > Hi,
    >
    > I am trying to discover how to obtain the correct time of say CST/
    > America and EST/America in python?
    >
    > Any help on this would be appreciated.
    >
    > Thanks,
    > Garyc


    I found some information. Someone suggested I use the pytz library?

    Cheers,
    Garyc
     
    gazza, Feb 1, 2010
    #2
    1. Advertising

  3. gazza

    pograph Guest

    On Jan 31, 4:01 pm, gazza <> wrote:
    > On Jan 31, 3:27 pm, gazza <> wrote:
    >
    > > Hi,

    >
    > > I am trying to discover how to obtain the correct time of say CST/
    > > America and EST/America in python?

    >
    > > Any help on this would be appreciated.

    >
    > > Thanks,
    > > Garyc

    >
    > I found some information. Someone suggested I use the pytz library?
    >
    > Cheers,
    > Garyc


    tz = pytz.timezone('US/Pacific')
    t = datetime.datetime.now(tz)
     
    pograph, Feb 1, 2010
    #3
  4. gazza

    Gary Herron Guest

    gazza wrote:
    > Hi,
    >
    > I am trying to discover how to obtain the correct time of say CST/
    > America and EST/America in python?
    >
    > Any help on this would be appreciated.
    >
    >
    > Thanks,
    > Garyc
    >

    The datetime module should give you all you need.

    Gary Herron
     
    Gary Herron, Feb 1, 2010
    #4
    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. Stephen
    Replies:
    1
    Views:
    1,216
    Purl Gurl
    May 19, 2004
  2. red floyd
    Replies:
    2
    Views:
    816
    red floyd
    Oct 23, 2003
  3. John Hunter

    datetimes, tzinfo and gmtime epoch

    John Hunter, Apr 16, 2004, in forum: Python
    Replies:
    0
    Views:
    307
    John Hunter
    Apr 16, 2004
  4. Florian Lindner

    timedelta comparision with gmtime()

    Florian Lindner, Jun 22, 2005, in forum: Python
    Replies:
    1
    Views:
    499
  5. KW
    Replies:
    1
    Views:
    1,835
    Eric Sosman
    Dec 8, 2004
Loading...

Share This Page