Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 # Use of this source code is governed by a BSD-style license that can be | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 import time | |
| 6 | |
| 7 def timestamp(local=False): | |
|
jbudorick
2017/06/20 14:12:55
As mentioned in the other file, remove this & do i
| |
| 8 """Returns a consistently formatted timestamp. | |
| 9 | |
| 10 Args | |
| 11 local: Returns local time instead of UTC | |
| 12 """ | |
| 13 return time.strftime( | |
| 14 '%Y-%m-%dT%H:%M:%SZ', | |
|
jbudorick
2017/06/20 14:12:55
This is wrong if local=True -- the trailing Z indi
| |
| 15 time.localtime() if local else time.gmtime()) | |
| OLD | NEW |