From: gazza on
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
From: gazza on
On Jan 31, 3:27 pm, gazza <burslem2...(a)yahoo.com> 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
From: pograph on
On Jan 31, 4:01 pm, gazza <burslem2...(a)yahoo.com> wrote:
> On Jan 31, 3:27 pm, gazza <burslem2...(a)yahoo.com> 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)
From: Gary Herron on
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