Skip to content

Commit 14a193f

Browse files
committed
fix: windows time
1 parent 0ddca8c commit 14a193f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/runtime/io.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -751,17 +751,17 @@ extern "C" LEAN_EXPORT obj_res lean_windows_get_next_transition(b_obj_arg timezo
751751
#endif
752752
}
753753

754-
/* Std.Time.Database.Windows.getLocalTimeZoneIdentifierAt : Int → IO String */
755-
extern "C" LEAN_EXPORT obj_res lean_get_windows_local_timezone_id_at(obj_arg tm_obj, obj_arg /* w */) {
754+
/* Std.Time.Database.Windows.getLocalTimeZoneIdentifierAt : @&Int64 → IO String */
755+
extern "C" LEAN_EXPORT obj_res lean_get_windows_local_timezone_id_at(uint64_t tm_obj, obj_arg /* w */) {
756756
#if defined(LEAN_WINDOWS)
757757
UErrorCode status = U_ZERO_ERROR;
758758
UCalendar* cal = ucal_open(NULL, -1, NULL, UCAL_GREGORIAN, &status);
759759

760760
if (U_FAILURE(status)) {
761761
return lean_io_result_mk_error(lean_decode_io_error(EINVAL, mk_string("failed to open calendar")));
762762
}
763-
764-
int64_t timestamp_secs = lean_scalar_to_int64(tm_obj);
763+
0
764+
int64_t timestamp_secs = (int64_t)tm_obj;
765765
ucal_setMillis(cal, timestamp_secs * 1000, &status);
766766

767767
if (U_FAILURE(status)) {

0 commit comments

Comments
 (0)