Skip to content
Advertisement

Tag: rest-assured

How to avoid using milliseconds when using OffsetDateTime.now()

I am using OffsetDateTime.now() to get the current date in UTC format and result includes milliseconds too. I don’t want milliseconds to be sent . Is there a way i can remove Milliseconds from OffsetDateTime.now() without using split. Answer tl;dr Details The date-time classes such as OffsetDateTime are not strings. They do not have a format. Rather than thinking in

Advertisement