DmitrMakeev commited on
Commit
3941128
·
verified ·
1 Parent(s): 72e075d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -0
app.py CHANGED
@@ -129,6 +129,24 @@ for db in DATABASES:
129
 
130
 
131
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
  template = {
133
  "username": "name",
134
  "phone": "phone",
 
129
 
130
 
131
 
132
+ @app.route('/get_current_time', methods=['GET'])
133
+ def get_current_time():
134
+ utc_now = datetime.utcnow()
135
+ msk_tz = pytz.timezone('Europe/Moscow')
136
+ msk_now = utc_now.replace(tzinfo=pytz.utc).astimezone(msk_tz)
137
+ current_time = msk_now.strftime('%Y-%m-%d %H:%M:%S')
138
+ return jsonify({'current_time': current_time})
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
  template = {
151
  "username": "name",
152
  "phone": "phone",