소스 검색

date: Display time zone information in all output formats

Timothy Flynn 3 년 전
부모
커밋
82509ca0c8
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  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) {
     if (print_unix_date) {
         outln("{}", date.timestamp());
         outln("{}", date.timestamp());
     } else if (print_iso_8601) {
     } 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) {
     } 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) {
     } 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 {
     } else {
         outln("{}", date.to_string());
         outln("{}", date.to_string());
     }
     }