Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(14)  |  Call(14)  |  Derive(0)  |  Import(0)
Return the timezone in which the object is represented.

src/e/r/erp5-HEAD/product/Formulator/Widget.py   erp5(Download)
      minute = "%02d" % value.minute()
      ampm = value.ampm()
      timezone = value.timezone()
    input_order = self.getInputOrder(field)
    if input_order == 'ymd':

src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/utils.py   Products.BastionLedger(Download)
    if not isinstance(dt, DateTime):
        dt = DateTime(dt)
    return DateTime('%i/%s/01 %s' % (dt.year(), dt.mm(), dt.timezone()))
 
def month_ending_date(dt):
    # find the first of the next month (thats easy) then deduct a day ...
    if dt.month() == 12:
        return DateTime('%i/01/01 %s' % ((dt.year() + 1), dt.timezone())) - 1
    return DateTime('%i/%0.2i/01 %s' % (dt.year(), dt.month() + 1, dt.timezone())) - 1
 

src/d/a/DateTime-4.0.1/src/DateTime/tests/test_datetime.py   DateTime(Download)
            dt.minute(),
            dt.second(),
            dt.timezone())
        dt1 = DateTime(dt1s)
        # Compare representations as it's the
    def testConstructor5(self):
        # Constructor from time float and timezone
        dt = DateTime()
        dt1 = DateTime(float(dt), dt.timezone())
        self.assertEqual(str(dt), str(dt1), (dt, dt1))
        dt1 = DateTime(float(dt), unicode(dt.timezone()))
            dt.minute(),
            dt.second(),
            dt.timezone())
        # Compare representations as it's the
        # only way to compare the dates to the same accuracy

src/s/l/slapos.core-HEAD/master/bt5/slapos_accounting/TestTemplateItem/testSlapOSAccountingAlarm.py   slapos.core(Download)
    # of month
    now = DateTime()
    now = now.toZone(request_time.timezone())
    stop_date = getClosestDate(target_date=now, precision='month')
    stop_date = addToDate(stop_date, to_add={'second': -1})

src/p/r/Products.CMFCore-2.2.8/Products/CMFCore/tests/test_PortalFolder.py   Products.CMFCore(Download)
 
        creation_date = DateTime('2001/01/01')
        tz = creation_date.timezone()
        cfilter = ContentFilter( created=creation_date
                               , created_usage='range:min' )
 
        creation_date = DateTime('2001/01/01')
        tz = creation_date.timezone()
        cfilter = ContentFilter( created=creation_date
                               , created_usage='range:max' )
 
        creation_date = DateTime('2001/01/01')
        tz = creation_date.timezone()
        cfilter = ContentFilter( modified=DateTime( '2001/01/01' )
                               , modified_usage='range:min' )
 
        creation_date = DateTime('2001/01/01')
        tz = creation_date.timezone()
        cfilter = ContentFilter( modified=DateTime( '2001/01/01' )
                               , modified_usage='range:max' )
 
        creation_date = DateTime('2001/01/01')
        tz = creation_date.timezone()
        cfilter = ContentFilter( created=DateTime( '2001/01/01' )
                               , created_usage='range:max'