smartcat-labs / ranger

Ranger is contextual data generator used to make sensible data for integration tests or to play with it in the database
https://www.smartcat.io/products/ranger-contextual-data-and-load-generator
Apache License 2.0
59 stars 11 forks source link

Create now() function in configuration which will create current date #151

Closed vajda closed 7 years ago

vajda commented 7 years ago

There is no way to generate timestamp with current time in configuration. To allow it, now() function should be implemented which would return epoch milliseconds. Then, it can be used in configuration in following way:

event:
  name: random(['update', 'create', 'delete'])
  timestamp: time('YYYY-MM-dd:hh:mm:ss.SSS', now())