File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 33from  git  import  Git , Repo , InvalidGitRepositoryError 
44import  os 
55from  datetime  import  datetime 
6- from   time   import  mktime ,  altzone 
6+ import  time 
77from  sc  import  fp , fs 
88
99import  locale 
@@ -45,15 +45,15 @@ def specs(content):
4545            with_extended_output = True , with_exceptions = False )
4646    if  status  !=  0 :
4747        # file is not managed by git 
48-         content .updated  =  datetime . fromtimestamp (os .stat (path ).st_mtime )
48+         content .updated  =  time . gmtime (os .stat (path ).st_mtime )
4949        content .gitrev  =  '(not yet committed)' 
5050    else :
5151        commits  =  repo .commits (path = path )
5252        assert  len (commits ) >  0 
53-         content .updated  =  datetime . fromtimestamp ( mktime ( commits [- 1 ].committed_date )  -   altzone ) 
54-         content .gitrev  =  commits [- 1 ].id 
53+         content .updated  =  commits [0 ].committed_date 
54+         content .gitrev  =  commits [0 ].id 
5555
56-     content .updated  =  content . updated . strftime ('%F %T %z  (%a, %d %B %Y)' )
56+     content .updated  =  time . strftime ('%F %T UTC  (%a, %d %B %Y)' ,  content . updated )
5757
5858def  register ():
5959    signals .content_object_init .connect (specs )
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments