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


    
    time_zone = None
    if isinstance(dt, str):
        dt = parser.parse(dt)
    if isinstance(dt, np.datetime64):
        dt_split = np.datetime_as_string(dt).split("T")
        date = dt_split[0]
        time = dt_split[1]
Italian Trulli
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: coala/coala-bears
Commit Name: d35238fd89be83200b5a28989632e5a1263f1262
Time: 2018-04-29
Author: 15bcs044@smvdu.ac.in
File Name: bears/vcs/git/GitCommitBear.py
Class Name: GitCommitBear
Method Name: get_host_from_remotes


Project Name: bokeh/bokeh
Commit Name: 16d3d0efcc91a4206be0c3f11ede33f9fc03cda9
Time: 2020-01-16
Author: bryan@bokeh.org
File Name: bokeh/core/property/datetime.py
Class Name: Datetime
Method Name: validate