import time
from datetime import datetime, timezone
import calendar

DEBUG = False

BLUE = '\033[94m'
RED = '\033[92m'
BOLD = '\033[1m'
END = '\033[0m'

def dbg(msg, end='\n'):
    if DEBUG:
        print(BLUE+BOLD+'[DBG] '+END+msg, end=end)

def err(msg):
    print(RED+BOLD+'[ERR] '+END+msg)
    assert False

TIME_FORMAT = '%Y-%m-%dT%H:%M:%S.%fZ'

def local_to_utc(local_posix_time):
    date = datetime.now(tz=timezone.utc)
    return local_posix_time + time.altzone

def tstr_to_posix(tstr):
    if tstr is None:
        date = datetime.now(tz=timezone.utc)
    else:
        date = datetime.strptime(tstr, TIME_FORMAT)
    return calendar.timegm(date.timetuple())


fe52f8889ef03341a56fefa6147b5b942540b5fe
<mask token>


def dbg(msg, end='\n'):
    if DEBUG:
        print(BLUE + BOLD + '[DBG] ' + END + msg, end=end)


def err(msg):
    print(RED + BOLD + '[ERR] ' + END + msg)
    assert False


<mask token>


def local_to_utc(local_posix_time):
    date = datetime.now(tz=timezone.utc)
    return local_posix_time + time.altzone


<mask token>

<mask token>


def dbg(msg, end='\n'):
    if DEBUG:
        print(BLUE + BOLD + '[DBG] ' + END + msg, end=end)


def err(msg):
    print(RED + BOLD + '[ERR] ' + END + msg)
    assert False


<mask token>


def local_to_utc(local_posix_time):
    date = datetime.now(tz=timezone.utc)
    return local_posix_time + time.altzone


def tstr_to_posix(tstr):
    if tstr is None:
        date = datetime.now(tz=timezone.utc)
    else:
        date = datetime.strptime(tstr, TIME_FORMAT)
    return calendar.timegm(date.timetuple())

<mask token>
DEBUG = False
BLUE = '\x1b[94m'
RED = '\x1b[92m'
BOLD = '\x1b[1m'
END = '\x1b[0m'


def dbg(msg, end='\n'):
    if DEBUG:
        print(BLUE + BOLD + '[DBG] ' + END + msg, end=end)


def err(msg):
    print(RED + BOLD + '[ERR] ' + END + msg)
    assert False


TIME_FORMAT = '%Y-%m-%dT%H:%M:%S.%fZ'


def local_to_utc(local_posix_time):
    date = datetime.now(tz=timezone.utc)
    return local_posix_time + time.altzone


def tstr_to_posix(tstr):
    if tstr is None:
        date = datetime.now(tz=timezone.utc)
    else:
        date = datetime.strptime(tstr, TIME_FORMAT)
    return calendar.timegm(date.timetuple())

import time
from datetime import datetime, timezone
import calendar
DEBUG = False
BLUE = '\x1b[94m'
RED = '\x1b[92m'
BOLD = '\x1b[1m'
END = '\x1b[0m'


def dbg(msg, end='\n'):
    if DEBUG:
        print(BLUE + BOLD + '[DBG] ' + END + msg, end=end)


def err(msg):
    print(RED + BOLD + '[ERR] ' + END + msg)
    assert False


TIME_FORMAT = '%Y-%m-%dT%H:%M:%S.%fZ'


def local_to_utc(local_posix_time):
    date = datetime.now(tz=timezone.utc)
    return local_posix_time + time.altzone


def tstr_to_posix(tstr):
    if tstr is None:
        date = datetime.now(tz=timezone.utc)
    else:
        date = datetime.strptime(tstr, TIME_FORMAT)
    return calendar.timegm(date.timetuple())

import time
from datetime import datetime, timezone
import calendar

DEBUG = False

BLUE = '\033[94m'
RED = '\033[92m'
BOLD = '\033[1m'
END = '\033[0m'

def dbg(msg, end='\n'):
    if DEBUG:
        print(BLUE+BOLD+'[DBG] '+END+msg, end=end)

def err(msg):
    print(RED+BOLD+'[ERR] '+END+msg)
    assert False

TIME_FORMAT = '%Y-%m-%dT%H:%M:%S.%fZ'

def local_to_utc(local_posix_time):
    date = datetime.now(tz=timezone.utc)
    return local_posix_time + time.altzone

def tstr_to_posix(tstr):
    if tstr is None:
        date = datetime.now(tz=timezone.utc)
    else:
        date = datetime.strptime(tstr, TIME_FORMAT)
    return calendar.timegm(date.timetuple())

