openreview-py icon indicating copy to clipboard operation
openreview-py copied to clipboard

datetime_millis util function could return wrong value

Open xkopenreview opened this issue 7 months ago • 3 comments

found this when executing test_venue_configuration from a different timezone

the pytest fail at assertion of

invitation = pc_client.get_invitation('ICLR.cc/2025/Conference/Submission1/-/Confidential_Comment')

the super confidential comment invitation is created but process function didn't create paper specific confidential comment invitations because the super invitation is not active yet.

the cdate set in pytest is correct which is

now - datetime.timedelta(minutes=1)

but when it's converted to mili seconds by tools.datetime_millis, the result was wrong which caused the super invitation to be inactive.

this is because

utcfromtimestamp(0)

was treated as local time

and it looks like utcfrormtimestamp function will be deprecated soon image

xkopenreview avatar Jul 18 '24 11:07 xkopenreview