logo

ACME Updates

27May2025 date_offset again

I realized that the new date_offset features from last week could result in days which don't exist, for example if it's May 31st and you do date_offset +1o you would get June 31st. Similarly for February 29th on non-leap years. Oops.

So I fixed that. But how to test it? I could wait for the 31st, which is actually only a few days away. I could change the system date, but that might mess up a lot of stuff. Then I had an idea: set the time zone offset to a large value:

% setenv TZ 'GMT-120'
% date
Sat May 31 15:11:53 GMT 2025

And the new code worked perfectly. http://acme.com/software/date_offset/


Back to ACME Updates.
address