eea5b10faa94c06bef0fca943ae26e9908dbe495,hyperspy/misc/date_time_tools.py,,update_date_time_in_metadata,#Any#Any#,90

Before Change


        split = datetime.split("T")
        date = split[0]
        time = split[1]
        if len(split) == 2:
            time_zone = datetime.split("T")[2]
    if isinstance(dt, datetime.datetime):
        date = dt.date().isoformat()
        time = dt.time().isoformat()
        if dt.tzname() is not None:

After Change


        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():
            time_zone = dt.tzname()

    metadata.set_item("General.date", date)
    metadata.set_item("General.time", time)
    if time_zone:
        metadata.set_item("General.time_zone", time_zone)
    if metadata.has_item("General.time_zone") and not time_zone:
        del metadata.General.time_zone
    return metadata
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: hyperspy/hyperspy
Commit Name: eea5b10faa94c06bef0fca943ae26e9908dbe495
Time: 2017-01-07
Author: eric.prestat@gmail.com
File Name: hyperspy/misc/date_time_tools.py
Class Name:
Method Name: update_date_time_in_metadata


Project Name: graphbrain/graphbrain
Commit Name: ba4c25a77488026fb6212790c4d460e2c76db326
Time: 2021-01-09
Author: telmo@telmomenezes.net
File Name: graphbrain/cognition/agents/reddit_parser.py
Class Name: RedditParser
Method Name: _parse_title


Project Name: CyberReboot/NetworkML
Commit Name: 238e771db2b65917324d72acb3e94905c595a10a
Time: 2018-07-17
Author: clewis@iqt.org
File Name: utils/pcap_utils.py
Class Name:
Method Name: is_private