OLD | NEW |
1 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 #if defined(FLETCH_TARGET_OS_LINUX) | 5 #if defined(FLETCH_TARGET_OS_LINUX) |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <stdlib.h> | 8 #include <stdlib.h> |
9 #include <unistd.h> | 9 #include <unistd.h> |
10 #include <time.h> | 10 #include <time.h> |
11 | 11 |
(...skipping 17 matching lines...) Expand all Loading... |
29 // TODO(ajohnsen): avoid excessive calls to tzset? | 29 // TODO(ajohnsen): avoid excessive calls to tzset? |
30 tzset(); | 30 tzset(); |
31 // Even if the offset was 24 hours it would still easily fit into 32 bits. | 31 // Even if the offset was 24 hours it would still easily fit into 32 bits. |
32 // Note that Unix and Dart disagree on the sign. | 32 // Note that Unix and Dart disagree on the sign. |
33 return static_cast<int>(-timezone); | 33 return static_cast<int>(-timezone); |
34 } | 34 } |
35 | 35 |
36 } // namespace fletch | 36 } // namespace fletch |
37 | 37 |
38 #endif // defined(FLETCH_TARGET_OS_LINUX) | 38 #endif // defined(FLETCH_TARGET_OS_LINUX) |
OLD | NEW |