Forum Discussion

DavidNewberger's avatar
DavidNewberger
New Contributor
9 years ago

How can I generate the current local and UTC time in epoch format in loadComplete

The Applications I'm testing uses epoch format for time. I'm looking to generate both the current local time and UTC time for a virtual user in epoch format. How might I accomplish this? 

 

Cheers,

 

David Newberger

3 Replies

    • DavidNewberger's avatar
      DavidNewberger
      New Contributor

      I'm looking for it to generate something like this:

      {
      "date": 1458564164, //local dateTime
      "dateUTC": 1458582164 //UTC dateTime
      }
      • AlexeyKryuchkov's avatar
        AlexeyKryuchkov
        SmartBear Alumni (Retired)

        Hi,

         

        It doesn't look like there's a straightforward way to generate such an object using LoadComplete features - the Custom String generator doesn't provide means to store date/time for further conversion. So, it looks like the best solution will be to generate such objects outside of LoadComplete and store them in one of the supported formats (CSV, Excel or DB).