mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:37:34 +00:00
LibCore: Support (and use) DateTime string formatting of the form %Z
This formats the time zone name. This is now used in the default format string because DateTime is meant to represent local time; it only makes sense to include the time zone by default now that we support non-UTC.
This commit is contained in:
parent
9605be19bb
commit
29c8ec5eb6
2 changed files with 4 additions and 1 deletions
|
@ -30,7 +30,7 @@ public:
|
|||
bool is_leap_year() const;
|
||||
|
||||
void set_time(int year, int month = 1, int day = 1, int hour = 0, int minute = 0, int second = 0);
|
||||
String to_string(const String& format = "%Y-%m-%d %H:%M:%S") const;
|
||||
String to_string(const String& format = "%Y-%m-%d %H:%M:%S %Z") const;
|
||||
|
||||
static DateTime create(int year, int month = 1, int day = 1, int hour = 0, int minute = 0, int second = 0);
|
||||
static DateTime now();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue