#inxilpro

1 messages · Page 1 of 1 (latest)

oak fjordBOT
charred hollow
#

Hello! You can check the frozen_time on the Test Clock before advancing it instead of checking the Charge creation time.

dim glacier
#

I guess my question is more about what's the "correct" timestamp to associate with a charge? It seems like charge.created is not guaranteed to be the timestamp that the charge was attempted.

#

I could code around this issue by checking to see if there's a test clock in place first, but I really hate writing test-specific logic in my production code.

#

Ideally I wouldn't use "now" in my application context, because it's possible that a webhook will be delivered a few days late if the application goes down.

charred hollow
#

A Charge's created timestamp can be used as you're describing, just not with Test Clocks. You would need to write special Test Clock logic I'm afraid.

dim glacier
#

Hm, OK. That seems like something that would be great to add to the Test Clocks API. It seems like the timestamps generated by test clocks should be the test clock timestamps, not the wall clock timestamps.

#

I'll come up with something for right now, though.