Subversion Repositories basico

Rev

Rev 207 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 207 Rev 217
Line 23... Line 23...
23
    def initialize(self):
23
    def initialize(self):
24
        self.uas = []
24
        self.uas = []
25
25
26
    def timestamp(self):
26
    def timestamp(self):
27
        now = datetime.now()
27
        now = datetime.now()
28
        timestamp = "%4d%02d%02d_%02d%02d%02d_%d" % (now.year, now.month, now.day, now.hour, now.minute, now.second, now.microsecond)
-
 
-
 
28
        timestamp = "%4d%02d%02d_%02d%02d%02d" % (now.year, now.month, now.day, now.hour, now.minute, now.second)
29
29
30
        return timestamp
30
        return timestamp
31
31
32
32
33
    def get_datetime(self, timestamp):
33
    def get_datetime(self, timestamp):
34
        adate = datetime.strptime(timestamp, "%Y%m%d_%H%M%S_%f")
-
 
-
 
34
        adate = datetime.strptime(timestamp, "%Y%m%d_%H%M%S")
35
        return adate
35
        return adate
36
36
37
37
38
    def fuzzy_date_from_timestamp(self, timestamp):
38
    def fuzzy_date_from_timestamp(self, timestamp):
39
        # ~ date = self.get_datetime(timestamp)
39
        # ~ date = self.get_datetime(timestamp)