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

Unified Diff: runtime/vm/os.h

Issue 10534114: Reapply "Refactor Date implementation in VM." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 80chars Created 8 years, 6 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/bootstrap_natives.h ('k') | runtime/vm/os_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/os.h
diff --git a/runtime/vm/os.h b/runtime/vm/os.h
index 490098384157069746296281526e4ef25edb784c..43c680d60750e0da1fc7ccb6a18833078ddfed24 100644
--- a/runtime/vm/os.h
+++ b/runtime/vm/os.h
@@ -18,40 +18,19 @@ class Isolate;
// Interface to the underlying OS platform.
class OS {
public:
- // Takes the seconds since epoch (midnight, January 1, 1970 UTC) and breaks it
- // down into date and time in the UTC timezone.
- // The returned year is offset by 1900. The returned month is 0-based.
- // Returns true if the conversion succeeds, false otherwise.
- static bool GmTime(int64_t seconds_since_epoch, tm* tm_result);
-
- // Takes the seconds since epoch (midnight, January 1, 1970 UTC) and breaks it
- // down into date and time in the local time.
- // The returned year is offset by 1900. The returned month is 0-based.
- // Returns true if the conversion succeeds, false otherwise.
- static bool LocalTime(int64_t seconds_since_epoch, tm* tm_result);
-
- // Takes the broken down date and time in UTC timezone and computes the
- // seconds since epoch (midnight, January 1, 1970 UTC).
- // The given year is offset by 1900. The given month is 0-based.
- // Returns true if the conversion succeeds, false otherwise.
- static bool MkGmTime(tm* tm, int64_t* seconds_result);
-
- // Takes the broken down date and time in local timezone and computes the
- // seconds since epoch (midnight, January 1, 1970 UTC).
- // The given year is offset by 1900. The given month is 0-based.
- // Returns true if the conversion succeeds, false otherwise.
- static bool MkTime(tm* tm, int64_t* seconds_result);
-
// Returns the abbreviated time-zone name for the given instant.
// For example "CET" or "CEST".
- static bool GetTimeZoneName(int64_t seconds_since_epoch,
- const char** name_result);
+ static const char* GetTimeZoneName(int64_t seconds_since_epoch);
// Returns the difference in seconds between local time and UTC for the given
// instant.
// For example 3600 for CET, and 7200 for CEST.
- static bool GetTimeZoneOffsetInSeconds(int64_t seconds_since_epoch,
- int* offset_result);
+ static int GetTimeZoneOffsetInSeconds(int64_t seconds_since_epoch);
+
+ // Returns the difference in seconds between local time and UTC when no
+ // daylight saving is active.
+ // For example 3600 in CET and CEST.
+ static int GetLocalTimeZoneAdjustmentInSeconds();
// Returns the current time in milliseconds measured
// from midnight January 1, 1970 UTC.
« no previous file with comments | « runtime/vm/bootstrap_natives.h ('k') | runtime/vm/os_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698