perl5 icon indicating copy to clipboard operation
perl5 copied to clipboard

Time::HiRes: implement utime() for win32

Open xenu opened this issue 3 years ago • 5 comments

We're in user-visible changes freeze, so this PR will probably have to wait until it's over.

xenu avatar Apr 03 '21 22:04 xenu

Since Time::HiRes is dual-life, how well does this interact with the stat() from older CRTs with the DST bug used in older perls?

One reason I needed to implement win32_utime() as well as win32_stat() was to avoid the times in the result of stat() being an hour off a time set by utime().

tonycoz avatar Apr 06 '21 00:04 tonycoz

I don't see how stat() DST bug affects utime(). If stat() returns the wrong timestamp, there's nothing utime() can do about it.

However, it seems that I completely forgot about leap seconds. Lifting your filetime_from_time() from win32.c should fix it. I'll mark this PR as a draft for now.

xenu avatar Apr 06 '21 01:04 xenu

BTW, the other Time::HiRes functions also have this problem.

xenu avatar Apr 06 '21 01:04 xenu

I don't see how stat() DST bug affects utime(). If stat() returns the wrong timestamp, there's nothing utime() can do about it.

However, it seems that I completely forgot about leap seconds. Lifting your filetime_from_time() from win32.c should fix it. I'll mark this PR as a draft for now.

@xenu, this p.r. has been in Draft status for more than a year. Do you still wish to pursue it?

jkeenan avatar Jul 03 '22 17:07 jkeenan

I don't see how stat() DST bug affects utime(). If stat() returns the wrong timestamp, there's nothing utime() can do about it. However, it seems that I completely forgot about leap seconds. Lifting your filetime_from_time() from win32.c should fix it. I'll mark this PR as a draft for now.

@xenu, this p.r. has been in Draft status for more than a year. Do you still wish to pursue it?

@xenu, this p.r. is still in draft status -- and has acquired merge conflicts. Do you still wish to pursue it?

jkeenan avatar Sep 16 '22 22:09 jkeenan

HI @xenu, @jkeenan has asked twice about this PR, which is now very old. Do you intend to pick this up again or should we close it?

demerphq avatar Feb 08 '23 07:02 demerphq

@xenu I resolved the conflicts in this PR.

demerphq avatar Feb 21 '23 03:02 demerphq