codehaus


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How do I get datetime to stop showing seconds?


   On 16 Oct 2020 12:50, Eryk Sun <eryksun at gmail.com> wrote:

     On 10/16/20, Steve <Gronicus at sga.ninja> wrote:
     > -----Original Message-----
     > From: Python-list <python-list-bounces+gronicus=sga.ninja at python.org>
     On
     > Behalf Of Frank Millman
     > Sent: Friday, October 16, 2020 4:34 AM
     > To: python-list at python.org
     > Subject: Re: How do I get datetime to stop showing seconds?
     >
     > On 2020-10-16 9:42 AM, Steve wrote:
     >> d2 =? datetime.datetime.now() #Time Right now
     >>?

   I was using datetime.now().isoformat('T', 'seconds')
   Not 100% sure, but the strings seemed to be 2hrs off. Could it be that
   this Linux server was using the wrong time zone?