Skip to content

Commit ccdfab4

Browse files
committed
make method infallible
1 parent 2aeafe7 commit ccdfab4

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/builtins/core/instant.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -236,12 +236,8 @@ impl Instant {
236236
}
237237

238238
// TODO: May end up needing a provider API during impl
239-
pub fn to_zoned_date_time_iso(&self, time_zone: TimeZone) -> TemporalResult<ZonedDateTime> {
240-
Ok(ZonedDateTime::new_unchecked(
241-
*self,
242-
Calendar::from_utf8(b"iso8601")?,
243-
time_zone,
244-
))
239+
pub fn to_zoned_date_time_iso(&self, time_zone: TimeZone) -> ZonedDateTime {
240+
ZonedDateTime::new_unchecked(*self, Calendar::default(), time_zone)
245241
}
246242
}
247243

0 commit comments

Comments
 (0)