1b3b4d1c85404abe255336a5569e23f474dfb8ab,modules/s3/s3datetime.py,S3DateTime,to_local,#Any#Any#,169
Before Change
delta = datetime.timedelta(0)
if not isinstance(dt, datetime.datetime):
combine = datetime.datetime.combine
bp = (combine(dt, datetime.time(8, 0, 0)) - delta).time()
dt = combine(dt, bp)
if dt.tzinfo is not None:
dt = dt.astimezone(tz=dateutil.tz.tzutc()).replace(tzinfo=None)
dt = dt + delta
After Change
if tzinfo:
if not isinstance(dt, datetime.datetime):
// Compute local date for noon UTC
dt = datetime.datetime.combine(dt, datetime.time(12,0,0))
if dt.tzinfo is None:
dt = dt.replace(tzinfo=dateutil.tz.tzutc())
dt = dt.astimezone(tz=tzinfo).replace(tzinfo=None)
else:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: sahana/eden
Commit Name: 1b3b4d1c85404abe255336a5569e23f474dfb8ab
Time: 2019-04-18
Author: dominic@nursix.org
File Name: modules/s3/s3datetime.py
Class Name: S3DateTime
Method Name: to_local
Project Name: sahana/eden
Commit Name: d193e5dc31f5363712c818d4b75094a8fe229f4a
Time: 2019-04-18
Author: dominic@nursix.org
File Name: modules/s3/s3datetime.py
Class Name: S3DateTime
Method Name: to_utc
Project Name: sahana/eden
Commit Name: 1b3b4d1c85404abe255336a5569e23f474dfb8ab
Time: 2019-04-18
Author: dominic@nursix.org
File Name: modules/s3/s3datetime.py
Class Name: S3DateTime
Method Name: to_utc