904e72663b634ce65641c3c99e2219e91aefc671,hyperspy/misc/date_time_tools.py,,update_date_time_in_metadata,#Any#Any#,96
Before Change
sp = dt.split("T")
date = sp[0]
time = sp[1]
if "+" in sp[1]:
time = "%s" % sp[1].split("+")[0]
time_zone = "+%s" % sp[1].split("+")[1]
elif "-" in sp[1]:
time = "%s" % sp[1].split("-")[0]
time_zone = "-%s" % sp[1].split("-")[1]
if isinstance(dt, datetime.datetime):
date = dt.date().isoformat()
time = dt.time().isoformat()
if dt.tzname():
After Change
if dt.tzname():
time_zone = dt.tzname()
elif dt.tzinfo:
time_zone = dt.isoformat()[-6:]
metadata.set_item("General.date", date)
metadata.set_item("General.time", time)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: hyperspy/hyperspy
Commit Name: 904e72663b634ce65641c3c99e2219e91aefc671
Time: 2017-01-10
Author: eric.prestat@gmail.com
File Name: hyperspy/misc/date_time_tools.py
Class Name:
Method Name: update_date_time_in_metadata
Project Name: home-assistant/home-assistant
Commit Name: ede432ba71a4a6b13ee7aa9eb20193ae5a28a777
Time: 2020-04-16
Author: chris@talkingtontech.com
File Name: homeassistant/components/sonarr/sensor.py
Class Name: SonarrSensor
Method Name: update
Project Name: bokeh/bokeh
Commit Name: 16d3d0efcc91a4206be0c3f11ede33f9fc03cda9
Time: 2020-01-16
Author: bryan@bokeh.org
File Name: bokeh/core/property/datetime.py
Class Name: Date
Method Name: transform