Skip to content

Commit d1df9ec

Browse files
committed
format
1 parent 5cdb4c4 commit d1df9ec

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

runtime-light/stdlib/time/timelib-functions.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -258,14 +258,14 @@ OutputIt date_format_to(OutputIt out, std::string_view format, timelib_time* t,
258258
[[fallthrough]];
259259
case 'O':
260260
out = std::format_to(out, "{}{:02}{}{:02}", localtime ? ((offset->offset < 0) ? '-' : '+') : '+', localtime ? std::abs(offset->offset / 3600) : 0,
261-
rfc_colon ? ":" : "", localtime ? std::abs((offset->offset % 3600) / 60) : 0);
261+
rfc_colon ? ":" : "", localtime ? std::abs((offset->offset % 3600) / 60) : 0);
262262
break;
263263
case 'T':
264264
out = std::format_to(out, "{}", localtime ? offset->abbr : "GMT");
265265
break;
266266
case 'e':
267267
if (!localtime) {
268-
out = std::format_to(out, "UTC");
268+
out = std::format_to(out, "UTC");
269269
} else {
270270
switch (t->zone_type) {
271271
case TIMELIB_ZONETYPE_ID:
@@ -287,13 +287,13 @@ OutputIt date_format_to(OutputIt out, std::string_view format, timelib_time* t,
287287
// full date/time
288288
case 'c':
289289
out = std::format_to(out, "{:04}-{:02}-{:02}T{:02}:{:02}:{:02}{}{:02}:{:02}", t->y, t->m, t->d, t->h, t->i, t->s,
290-
localtime ? ((offset->offset < 0) ? '-' : '+') : '+', localtime ? std::abs(offset->offset / 3600) : 0,
291-
localtime ? std::abs((offset->offset % 3600) / 60) : 0);
290+
localtime ? ((offset->offset < 0) ? '-' : '+') : '+', localtime ? std::abs(offset->offset / 3600) : 0,
291+
localtime ? std::abs((offset->offset % 3600) / 60) : 0);
292292
break;
293293
case 'r':
294-
out = std::format_to(out, "{:3}, {:02} {:3} {:04} {:02}:{:02}:{:02} {}{:02}{:02}", date_short_day_name(t->y, t->m, t->d), t->d, MON_SHORT_NAMES[t->m - 1], t->y,
295-
t->h, t->i, t->s, localtime ? ((offset->offset < 0) ? '-' : '+') : '+', localtime ? abs(offset->offset / 3600) : 0,
296-
localtime ? abs((offset->offset % 3600) / 60) : 0);
294+
out = std::format_to(out, "{:3}, {:02} {:3} {:04} {:02}:{:02}:{:02} {}{:02}{:02}", date_short_day_name(t->y, t->m, t->d), t->d, MON_SHORT_NAMES[t->m - 1],
295+
t->y, t->h, t->i, t->s, localtime ? ((offset->offset < 0) ? '-' : '+') : '+', localtime ? abs(offset->offset / 3600) : 0,
296+
localtime ? abs((offset->offset % 3600) / 60) : 0);
297297
break;
298298
case 'U':
299299
out = std::format_to(out, "{}", t->sse);

0 commit comments

Comments
 (0)