Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local datetime dynamic variable instead of UTC #433

Closed
schallm opened this issue Oct 15, 2019 · 3 comments
Closed

Local datetime dynamic variable instead of UTC #433

schallm opened this issue Oct 15, 2019 · 3 comments

Comments

@schallm
Copy link

schallm commented Oct 15, 2019

I need to send the datetime with local offset to an API (2019-10-15T10:45:50.124-05:00). I see that you can use {{$datetime iso8601}} to get the current datetime, however that is returns a UTC date (2019-10-15T15:45:50.124Z). Is this currently possible? If not, maybe add:

  • another dynamic variable like {{$datetimeLocal}}
  • another modifier to datetime to make it local like {{$datetime local iso8601}}

I tried to use formatting "timestamp": "{{$datetime 'YYYY-MM-DDTHH:mm:ss.SSSZZ'}}", but that still returns a UTC (2019-10-15T15:45:50.124+0000) since $datetime is actually UTC.

Huachao added a commit that referenced this issue Oct 16, 2019
@Huachao
Copy link
Owner

Huachao commented Oct 16, 2019

@schallm I added a new variable named $localDatetime, just as your first solution. And this patch will be published in next release

@Huachao Huachao closed this as completed Oct 16, 2019
@Huachao
Copy link
Owner

Huachao commented Nov 20, 2019

@schallm you can try the latest version 0.23.0 to verify it.

@schallm
Copy link
Author

schallm commented Nov 21, 2019

Works great! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants