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_MACOS) | 5 #if defined(FLETCH_TARGET_OS_MACOS) |
6 | 6 |
7 #include <mach-o/dyld.h> | 7 #include <mach-o/dyld.h> |
8 | 8 |
9 #include <CoreFoundation/CFTimeZone.h> | 9 #include <CoreFoundation/CFTimeZone.h> |
10 | 10 |
11 #include "src/shared/assert.h" | 11 #include "src/shared/assert.h" |
(...skipping 13 matching lines...) Expand all Loading... |
25 // Even if the offset was 24 hours it would still easily fit into 32 bits. | 25 // Even if the offset was 24 hours it would still easily fit into 32 bits. |
26 int offset = CFTimeZoneGetSecondsFromGMT(tz, CFAbsoluteTimeGetCurrent()); | 26 int offset = CFTimeZoneGetSecondsFromGMT(tz, CFAbsoluteTimeGetCurrent()); |
27 CFRelease(tz); | 27 CFRelease(tz); |
28 // Note that Unix and Dart disagree on the sign. | 28 // Note that Unix and Dart disagree on the sign. |
29 return static_cast<int>(-offset); | 29 return static_cast<int>(-offset); |
30 } | 30 } |
31 | 31 |
32 } // namespace fletch | 32 } // namespace fletch |
33 | 33 |
34 #endif // defined(FLETCH_TARGET_OS_MACOS) | 34 #endif // defined(FLETCH_TARGET_OS_MACOS) |
OLD | NEW |