• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email

All Samples(9236)  |  Call(8414)  |  Derive(0)  |  Import(822)
strftime(format[, tuple]) -> string

Convert a time tuple to a string according to a format specification.
See the library reference manual for formatting codes. When the time tuple
is not present, current time as returned by localtime() is used.

src/e/d/Edwin-HEAD/scripts/jabber/doc/examples/logger.py   Edwin(Download)
    tp=time.mktime(time.strptime(ts,'%Y%m%dT%H:%M:%S %Z'))+3600*3
    if time.localtime()[-1]: tp+=3600
    tp=time.localtime(tp)
    fold=stanza.getFrom().getStripped().replace('@','%')+'_'+time.strftime("%Y.%m",tp)
    day=time.strftime("%d",tp)
    tm=time.strftime("%H:%M:%S",tp)
    try: os.mkdir(LOGDIR+fold)

src/f/b/fb-commut-HEAD/trunk/ifaces/jabber-comm-remote/xmpppy-0.4.1/doc/examples/logger.py   fb-commut(Download)
    tp=time.mktime(time.strptime(ts,'%Y%m%dT%H:%M:%S %Z'))+3600*3
    if time.localtime()[-1]: tp+=3600
    tp=time.localtime(tp)
    fold=stanza.getFrom().getStripped().replace('@','%')+'_'+time.strftime("%Y.%m",tp)
    day=time.strftime("%d",tp)
    tm=time.strftime("%H:%M:%S",tp)
    try: os.mkdir(LOGDIR+fold)

src/f/b/fb-commut-HEAD/ifaces/jabber-comm-remote/xmpppy-0.4.1/doc/examples/logger.py   fb-commut(Download)
    tp=time.mktime(time.strptime(ts,'%Y%m%dT%H:%M:%S %Z'))+3600*3
    if time.localtime()[-1]: tp+=3600
    tp=time.localtime(tp)
    fold=stanza.getFrom().getStripped().replace('@','%')+'_'+time.strftime("%Y.%m",tp)
    day=time.strftime("%d",tp)
    tm=time.strftime("%H:%M:%S",tp)
    try: os.mkdir(LOGDIR+fold)

src/g/1/g15m-HEAD/trunk/lglcd/Examples/DateTime.py   g15m(Download)
    while running:
        # Get current time
        now = time.localtime(time.time())
        lcd.SetText(txtTime, time.strftime("%H:%M:%S", now) )    
        lcd.SetText(txtDate, time.strftime("%A %d %B", now) )
        lcd.SetText(txtWeekDay, time.strftime("Week: %W Day: %j") )
 

src/b/a/badger-lib-HEAD/packages/gdata/samples/calendar/calendarExample.py   badger-lib(Download)
    else:
      if start_time is None:
        # Use current time for the start_time and have the event last 1 hour
        start_time = time.strftime('%Y-%m-%dT%H:%M:%S.000Z', time.gmtime())
        end_time = time.strftime('%Y-%m-%dT%H:%M:%S.000Z', 
            time.gmtime(time.time() + 3600))
      event.when.append(gdata.calendar.When(start_time=start_time, 

src/g/1/g15m-HEAD/lglcd/Examples/DateTime.py   g15m(Download)
    while running:
        # Get current time
        now = time.localtime(time.time())
        lcd.SetText(txtTime, time.strftime("%H:%M:%S", now) )    
        lcd.SetText(txtDate, time.strftime("%A %d %B", now) )
        lcd.SetText(txtWeekDay, time.strftime("Week: %W Day: %j") )
 

src/p/o/polinax-HEAD/libs/external_libs/gdata.py-1.0.13/samples/calendar/calendarExample.py   polinax(Download)
    else:
      if start_time is None:
        # Use current time for the start_time and have the event last 1 hour
        start_time = time.strftime('%Y-%m-%dT%H:%M:%S.000Z', time.gmtime())
        end_time = time.strftime('%Y-%m-%dT%H:%M:%S.000Z', 
            time.gmtime(time.time() + 3600))
      event.when.append(gdata.calendar.When(start_time=start_time, 

src/p/y/pyjamas-0.7/examples/libtest/TimeModuleTest.py   Pyjamas(Download)
    def testStrftime(self):
        t = 1246446000
        ttuple = time.gmtime(t)
        s = time.strftime("-%%-%d-%H-%I-%j-%m-%M-%p-%S-%w-%W-%y-%Y-", ttuple)
        self.assertEqual(s, "-%-01-11-11-182-07-00-AM-00-3-26-09-2009-")
        s = time.strftime("%c")
        s = time.strftime("%x")
        s = time.strftime("%X")

src/g/1/g15m-HEAD/trunk/lglcd/Examples/CPURamGraph.py   g15m(Download)
        lcd.AddGraphData(ramGraph, ramUsage) 
        # update current time & date
        now = time.localtime(time.time())
        lcd.SetText(txtTimeDate, time.strftime("%H:%M:%S %A %d %B", now) )    
        lcd.SetText(txtWeekDay, time.strftime("Week: %W Day: %j") )
 
        # quit application when LCDButton4 is pressed

src/g/1/g15m-HEAD/trunk/lglcd/Examples/CpuRamDatev2.py   g15m(Download)
 
        # update current time & date
        now = time.localtime(time.time())
        lcd.SetText(txtTimeDate, time.strftime("%H:%M:%S %A %d %B", now) )    
        lcd.SetText(txtWeekDay, time.strftime("Week: %W Day: %j") )
 
        # quit application when LCDButton4 is pressed

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next