# coding=utf-8
from __future__ import absolute_import, unicode_literals, print_function
from talos.backbone.gql import remote_execute
from talos.libs.datetime_utils import tzlc
import iso8601


def gaia_gql_call(query, variables=None):
    return remote_execute(query, variables)  # TODO: use a real remote rpc call


def strtzlc(dt):
    if dt is None:
        return None
    else:
        return tzlc(iso8601.parse_date(dt, None))