Jelajahi Sumber

[FIX] utc date

Gogs 7 tahun lalu
induk
melakukan
d51eec47ec
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      controllers/main.py

+ 2 - 2
controllers/main.py

@@ -35,7 +35,7 @@ class PosSales(http.Controller):
         Get server date
     '''
     def get_server_date(self):
-        return datetime.now().strftime(DATE_FORMAT)
+        return datetime.utcnow().strftime(DATE_FORMAT)
 
     '''
         Get current user information
@@ -583,7 +583,7 @@ class PosSales(http.Controller):
         self.make_info_log('Processing sale...')
 
         # Get date
-        date_now = datetime.now().strftime(DATE_FORMAT)
+        date_now = datetime.utcnow().strftime(DATE_FORMAT)
         self.make_info_log('[OK] Getting date')
 
         # Get currency