Replace strftime() with Glib::DateTime() -- GUI
This is mainly for windows compatibility "%F" is not supported. An alternative would be to s/%F/%Y-%m-%d/ to produce the ISO date.
This commit is contained in:
parent
9e2b896516
commit
7696380cfd
@ -963,18 +963,11 @@ ARDOUR_UI::archive_session ()
|
||||
void
|
||||
ARDOUR_UI::quick_snapshot_session (bool switch_to_it)
|
||||
{
|
||||
char timebuf[128];
|
||||
time_t n;
|
||||
struct tm local_time;
|
||||
|
||||
time (&n);
|
||||
localtime_r (&n, &local_time);
|
||||
strftime (timebuf, sizeof(timebuf), "%FT%H.%M.%S", &local_time);
|
||||
if (switch_to_it && _session->dirty ()) {
|
||||
save_state_canfail ("");
|
||||
}
|
||||
|
||||
save_state (timebuf, switch_to_it);
|
||||
if (switch_to_it && _session->dirty ()) {
|
||||
save_state_canfail ("");
|
||||
}
|
||||
Glib::DateTime tm (g_date_time_new_now_local ());
|
||||
save_state (tm.format ("%FT%H.%M.%S"), switch_to_it);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user