Did I find the right examples for you? yes no

All Samples(18)  |  Call(14)  |  Derive(0)  |  Import(4)
Current UTC/GMT time with time zone.

        def now():
    """Current UTC/GMT time with time zone."""
    return datetime.now(tzutc())
        


src/p/y/pyramid_scheduler-0.3.0/pyramid_scheduler/scheduler.py   pyramid_scheduler(Download)
from apscheduler.jobstores.ram_store import RAMJobStore
from apscheduler.util import combine_opts, ref_to_obj, obj_to_ref
from .util import adict, asdur, addPrefix, makeID, cull, now, ts2dt, dt2ts, resolve
from . import api, broker
 
    if not ( isinstance(ts, int) or isinstance(ts, float) ):
      ts = dt2ts(ts)
    if ts > ( now() + self.TIMEPAD ):
      return ts2dt(ts)
    if grace is None:
      grace = self.conf.grace
    if ts < ( now() - grace ):
      return ts2dt(ts)
    return ts2dt(now() + self.TIMEPAD)
      self.aps.add_date_job(
        pyramid_scheduler_wrapper,
        ts2dt(now() + self.TIMEPAD), args=(self.id, job.id, job.task), **params)
      return
    if job.type == 'date':

src/s/m/Smap-2.0.bcb1a7/smap/reporting.py   Smap(Download)
    def deliverable(self):
        """Check if attempt should be called
        :rvalue boolean: True if a report should be sent
        """
        now = util.now()
    def _success(self, resp):
        self['Busy'] = False
        if resp.code in [200, 201, 204]:
            # on success record the time and remove the data
            self['LastSuccess'] = util.now()
            return
 
        self['LastAttempt'] = util.now()
        log.msg("publishing to %s: %i %s" % 
                (self['ReportDeliveryLocation'][self['ReportDeliveryIdx']],
        deferList, deleteList = [], []
        for sub in self.subscribers:
            now = util.now()
            if sub.get('ExpireTime', now) < now:
                # remove expired reports

src/v/i/vingd-0.1.6/vingd/client.py   vingd(Download)
from .exceptions import Forbidden, GeneralException, InternalError, InvalidData, NotFound
from .response import Codes
from .util import quote, hash, safeformat, now, absdatetime
from . import __version__
 

src/s/m/Smap-2.0.bcb1a7/smap/server.py   Smap(Download)
        # add readings to a timeseries
        # get_timeseries will look up based on either path or uuid
        s.get_timeseries("/sensor0").add(util.now(), 12)
        s.get_timeseries("/sensor0").add(util.now(), 13)
 
#             s.get_timeseries('/sensor0')._add(util.now(), counter)
#             s.get_timeseries('/sensor1')._add(counter)
            s._add('/sensor0', util.now(), counter)
            s._add('/sensor1', counter)
            counter += 1

src/s/m/Smap-2.0.bcb1a7/smap/jobs.py   Smap(Download)
    def add_job(self, job):
        j = SmapJob(job)
        if 'StartTime' in job:
            start = job['StartTime'] / 1000.
            wait = start - util.now()

src/s/m/Smap-2.0.bcb1a7/smap/subscriber.py   Smap(Download)
    def subscribe(self):
        """Send or re-send the request for data.
        """
        if self.expire_time:
            self.rpt_obj['ExpireTime'] = util.now() + int(self.expire_time * 1000)

src/g/o/google_news_crawler-0.3.8/google_news_crawler/datastore/fs_datastore.py   google_news_crawler(Download)
from . import LOG
from base_datastore import BaseDatastore
from util import now
 
 
        """
        if warc_date is None:
            warc_date = now()
 
        with open(fname, "w") as warc_file:

src/g/o/google_news_crawler-0.3.8/google_news_crawler/gnc.py   google_news_crawler(Download)
import tldextract
 
from util import now