1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-18 14:21:41 +00:00

Add editor screenshot on control - f12.

This commit is contained in:
K. S. Ernest (iFire) Lee
2019-03-29 06:53:11 -07:00
parent e2bbf2cba3
commit 05de0eafab
4 changed files with 95 additions and 0 deletions

View File

@@ -51,6 +51,35 @@ uint32_t OS::get_ticks_msec() const {
return get_ticks_usec() / 1000;
}
String OS::get_iso_date_time(bool local) const {
OS::Date date = get_date(local);
OS::Time time = get_time(local);
String timezone;
if (!local) {
TimeZoneInfo zone = get_time_zone_info();
if (zone.bias >= 0) {
timezone = "+";
}
timezone = timezone + itos(zone.bias / 60).pad_zeros(2) + itos(zone.bias % 60).pad_zeros(2);
} else {
timezone = "Z";
}
return itos(date.year).pad_zeros(2) +
"-" +
itos(date.month).pad_zeros(2) +
"-" +
itos(date.day).pad_zeros(2) +
"T" +
itos(time.hour).pad_zeros(2) +
":" +
itos(time.min).pad_zeros(2) +
":" +
itos(time.sec).pad_zeros(2) +
timezone;
}
uint64_t OS::get_splash_tick_msec() const {
return _msec_splash;
}