Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(514)

Side by Side Diff: appengine/findit/libs/time_util.py

Issue 2538373003: [Culprit-Finder] Merge lib/ to libs/. (Closed)
Patch Set: . Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import calendar 5 import calendar
6 from datetime import datetime 6 from datetime import datetime
7 from datetime import time 7 from datetime import time
8 from datetime import timedelta 8 from datetime import timedelta
9 9
10 import pytz 10 import pytz
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 naive_time(datetime): naive time in local time zone, for example '+0800'. 89 naive_time(datetime): naive time in local time zone, for example '+0800'.
90 90
91 Return: 91 Return:
92 A naive datetime object in utc time zone. 92 A naive datetime object in utc time zone.
93 For example: 93 For example:
94 For TimeZoneInfo('+0800'), and naive local time is 94 For TimeZoneInfo('+0800'), and naive local time is
95 datetime(2016, 9, 1, 10, 0, 0), the returned result should be 95 datetime(2016, 9, 1, 10, 0, 0), the returned result should be
96 datetime(2016, 9, 1, 2, 0, 0) in utc time. 96 datetime(2016, 9, 1, 2, 0, 0) in utc time.
97 """ 97 """
98 return naive_time - self._utcoffset 98 return naive_time - self._utcoffset
OLDNEW
« no previous file with comments | « appengine/findit/libs/test/time_util_test.py ('k') | appengine/findit/model/base_suspected_cl.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698