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

What is the java code that can be output according to the timezone? #406

Open
adodaorbit opened this issue Jan 18, 2024 · 2 comments
Open

Comments

@adodaorbit
Copy link

Hello.

I want to use the java code to find the time after viewing the guide content on the https://spinnaker.io/docs/reference/pipeline/expressions/ #code page.

However, the server time setting is UTC, so I can't output the right time for the timezone.

What is the java code that can be output according to the timezone?

I tried several codes but they didn't work.

${new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(T(java.util.Date).from(T(java.time.ZonedDateTime).now(T(java.time.ZoneId).of("Asia/Seoul")).toInstant()))}

${T(java.time.LocalDateTime).now(T(java.time.ZoneId).of("Asia/Seoul"))}
@spinnakerbot
Copy link

This issue hasn't been updated in 45 days, so we are tagging it as 'stale'. If you want to remove this label, comment:

@spinnakerbot remove-label stale

@spinnakerbot
Copy link

This issue is tagged as 'stale' and hasn't been updated in 45 days, so we are tagging it as 'to-be-closed'. It will be closed in 45 days unless updates are made. If you want to remove this label, comment:

@spinnakerbot remove-label to-be-closed

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

No branches or pull requests

2 participants