Skip to content

Commit 2fc0cac

Browse files
committed
remove misguided addition to timezone try_from_string
1 parent 7485fcc commit 2fc0cac

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

src/builtins/core/instant.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ mod tests {
341341
options::{DifferenceSettings, TemporalRoundingMode, TemporalUnit},
342342
primitive::FiniteF64,
343343
time::EpochNanoseconds,
344-
TimeZone, NS_MAX_INSTANT, NS_MIN_INSTANT,
344+
NS_MAX_INSTANT, NS_MIN_INSTANT,
345345
};
346346

347347
#[test]
@@ -607,15 +607,6 @@ mod tests {
607607
);
608608
}
609609

610-
#[test]
611-
// timezone-case-insensitive.js
612-
fn timezone_case_insensitive() {
613-
let instance = Instant::try_new(0).unwrap();
614-
let time_zone = TimeZone::try_from_str("uTc").unwrap();
615-
let result = instance.to_zoned_date_time_iso(time_zone).unwrap();
616-
assert_eq!(result.timezone().identifier().unwrap(), "UTC");
617-
}
618-
619610
// /test/built-ins/Temporal/Instant/prototype/add/cross-epoch.js
620611
#[cfg(feature = "tzdb")]
621612
#[test]

src/builtins/core/timezone.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,7 @@ impl TimeZone {
105105
}
106106

107107
pub fn try_from_str(src: &str) -> TemporalResult<Self> {
108-
let normalized = src.to_uppercase();
109-
if let Ok(timezone) = Self::try_from_identifier_str(&normalized) {
108+
if let Ok(timezone) = Self::try_from_identifier_str(src) {
110109
return Ok(timezone);
111110
}
112111

0 commit comments

Comments
 (0)