Explorar o código

date: Display time zone information in all output formats

Timothy Flynn %!s(int64=3) %!d(string=hai) anos
pai
achega
82509ca0c8
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      Userland/Utilities/date.cpp

+ 3 - 3
Userland/Utilities/date.cpp

@@ -56,11 +56,11 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
     if (print_unix_date) {
         outln("{}", date.timestamp());
     } else if (print_iso_8601) {
-        outln("{}", date.to_string("%Y-%m-%dT%H:%M:%S-00:00"));
+        outln("{}", date.to_string("%Y-%m-%dT%H:%M:%S%:z"));
     } else if (print_rfc_5322) {
-        outln("{}", date.to_string("%a, %d %b %Y %H:%M:%S -0000"));
+        outln("{}", date.to_string("%a, %d %b %Y %H:%M:%S %z"));
     } else if (print_rfc_3339) {
-        outln("{}", date.to_string("%Y-%m-%d %H:%M:%S-00:00"));
+        outln("{}", date.to_string("%Y-%m-%d %H:%M:%S%:z"));
     } else {
         outln("{}", date.to_string());
     }