System date with DAML Script

In scenarios one had the option to modify the system date using passToDate. Can I somehow achieve the same using DAML Scripts? (Obviously static time is assumed here.)

2 Likes

At the moment, DAML Script does not provide functionality to interact with the time service. Your easiest option is probably to use grpcurl. Note that the time service is only intended for testing and isn’t necessarily supported by all ledgers.

2 Likes

I have just merged a PR that adds setTime to DAML Script. This will be available in the snapshot release next week and in SDK 1.3.0 Integrate time service into DAML Script (#6417) · digital-asset/daml@0a8c1eb · GitHub.

1 Like