# Portable way to get the time on a DAML-ledger, especially on DABL

**URL:** <https://forum.canton.network/t/portable-way-to-get-the-time-on-a-daml-ledger-especially-on-dabl/165>\
**Category:** App Development\
**Tags:** daml, ledger, damlhub\
**Created:** [April 17, 2020, 11:11am UTC](https://forum.canton.network/t/portable-way-to-get-the-time-on-a-daml-ledger-especially-on-dabl/165 "2020-04-17T11:11:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Richard\_Kapolnai](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/richard_kapolnai/32/89_2.png) [@Richard\_Kapolnai](https://forum.canton.network/u/Richard_Kapolnai)\
**Post date:** [April 17, 2020, 11:11am UTC](https://forum.canton.network/t/portable-way-to-get-the-time-on-a-daml-ledger-especially-on-dabl/165/1 "2020-04-17T11:11:59Z")

</div>

What is the preferred way to put current time on contracts? Most importantly on DABL, _right now_. But also in general, in some portable way.

`getTime` is not supported on DABL.

The application could input time to the ledger, but than the DAML model could not prevent anyone to falsify time.

We used an automation to periodically update some `CurrentTime` contracts on the ledger in the [Market Data Ref App](https://github.com/digital-asset/ex-market-data-service/tree/master/src/main/java/com/digitalasset/refapps/marketdataservice/timeservice), but this is a bit heavyweight and should be ported to DAZL from Java in order to use it.

---

<div class="post-metadata">

**Author:** ![bernhard](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/bernhard/32/356_2.png) [@bernhard](https://forum.canton.network/u/bernhard)\
**Post date:** [April 17, 2020, 12:51pm UTC](https://forum.canton.network/t/portable-way-to-get-the-time-on-a-daml-ledger-especially-on-dabl/165/2 "2020-04-17T12:51:47Z")

</div>

I think you have listed all the ways:

1. Client submitted time (means you have to trust all clients)
2. A time oracle (a bit heavyweight)
3. Ledger Time (Not supported in DABL yet)

DABL should start supporting it soon, I think. Maybe @dtanabe can give a timeline?
