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

All Samples(10)  |  Call(10)  |  Derive(0)  |  Import(0)
Return a DateTime with the value as the current
object, represented in the indicated timezone.

src/p/l/plone.app.event-1.2.4/plone/app/event/at/content.py   plone.app.event(Download)
        end = DateTime('%s 23:59:59 %s' % (end.Date(), timezone))
 
    start_field.set(obj, start.toZone('UTC'))
    end_field.set(obj, end.toZone('UTC'))
 

src/s/i/silva.app.news-3.0.4/src/silva/app/news/codesources/api.py   silva.app.news(Download)
        # string
        dt = DateTime(dt)
        return dt.toZone(dt.localZone())
    elif type(dt) == tuple:
        # tuple

src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/Ledger.py   Products.BastionLedger(Download)
        if not isinstance(dt, DateTime):
            dt = DateTime(dt)
        return self.toLocalizedTime(dt.toZone(self.timezone), long_format)
 
    def _memberInfo(self, memberids):

src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/BLTransaction.py   Products.BastionLedger(Download)
    if type(effective) == types.StringType:
        effective = DateTime(effective)
    effective.toZone(self.timezone)
 
    self._setObject(id, BLTransaction(id, title, effective, ref, tags))

src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/BLSubsidiaryTransaction.py   Products.BastionLedger(Download)
    if type(effective) == types.StringType:
        effective = DateTime(effective)
    effective.toZone(self.timezone)
 
    self._setObject(id, BLSubsidiaryTransaction(id, title, effective, ref, tags, control))

src/d/a/DateTime-4.0.1/src/DateTime/tests/test_datetime.py   DateTime(Download)
    def testOldDate(self):
        # Fails when an 1800 date is displayed with negative signs
        dt = DateTime('1830/5/6 12:31:46.213 pm')
        dt1 = dt.toZone('GMT+6')
        self.assertTrue(str(dt1).find('-') < 0, (dt, dt1))
    def testTZ2(self):
        # Time zone manipulation test 2
        dt = DateTime()
        dt1 = dt.toZone('GMT')
        s = dt.second()
        dt = DateTime('Wed, 19 Nov 2003 18:32:07 -0215')
        dt_string = dt.strftime(format)
        dt_local = dt.toZone(_findLocalTimeZoneName(0))
        dt_localstring = dt_local.strftime(format)
        self.assertEqual(dt_string, dt_localstring)

src/e/r/erp5-HEAD/product/ERP5/tests/testSupply.py   erp5(Download)
    self.assertEqual(1, len(result) )
    result = result[0]
    self.assertEqual(result.start_date_range_min, new_date.toZone('UTC'))