+
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tests/by-util/test_date.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// For the full copyright and license information, please view the LICENSE
// file that was distributed with this source code.
//
// spell-checker: ignore: AEDT AEST EEST NZDT NZST
// spell-checker: ignore: AEDT AEST EEST NZDT NZST Kolkata

use chrono::{DateTime, Datelike, Duration, NaiveTime, Utc}; // spell-checker:disable-line
use regex::Regex;
Expand Down Expand Up @@ -601,8 +601,8 @@ fn test_date_tz() {
test_tz("Australia/Sydney", JAN2, "2024-01-02 23:00:00 AEDT\n");
test_tz("Australia/Sydney", JUL2, "2024-07-02 22:00:00 AEST\n"); // Shifts the other way.
test_tz("Pacific/Tahiti", JAN2, "2024-01-02 02:00:00 -10\n"); // No abbreviation.
test_tz("Antarctica/South_Pole", JAN2, "2024-01-03 01:00:00 NZDT\n");
test_tz("Antarctica/South_Pole", JUL2, "2024-07-03 00:00:00 NZST\n");
test_tz("Pacific/Auckland", JAN2, "2024-01-03 01:00:00 NZDT\n");
test_tz("Pacific/Auckland", JUL2, "2024-07-03 00:00:00 NZST\n");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this a problem? I don't mind either way but I don't see South_Pole as being deprecated? Just duplicate?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a testing Debian system:


Test with TZ=Antarctica/South_Pole, date="2024-01-02 12:00:00 +0000".
bin: "/home/sylvestre/dev/debian/coreutils/target/debug/coreutils"
run: /home/sylvestre/dev/debian/coreutils/target/debug/coreutils date -d 2024-01-02 12:00:00 +0000 +%Y-%m-%d %H:%M:%S %Z

thread 'test_date::test_date_tz' panicked at tests/by-util/test_date.rs:582:14:
assertion failed: `(left == right)`

Diff < left / right > :
<2024-01-02 12:00:00 UTC
>2024-01-03 01:00:00 NZDT
 

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh! Thanks.

}

#[test]
Expand Down Expand Up @@ -634,7 +634,7 @@ fn test_date_tz_various_formats() {
"-0800 -08:00 -08:00:00 -08 PST\n",
);
// Half-hour timezone
test_tz("Asia/Calcutta", JAN2, "+0530 +05:30 +05:30:00 +05:30 IST\n");
test_tz("Asia/Kolkata", JAN2, "+0530 +05:30 +05:30:00 +05:30 IST\n");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good change though, not sure why I picked the other name.

test_tz("Europe/Berlin", JAN2, "+0100 +01:00 +01:00:00 +01 CET\n");
test_tz(
"Australia/Sydney",
Expand Down
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载