You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The problem is, it seems that the current implementation of datetime/format() doesn't allow to return a date in UTC. It is an important feature for logging purposes.
Describe the solution you'd like
I would like to be able to pass an options object to the formatter.format() function
export function format(date: Date, formatString: string, **options**): string {
const formatter = new DateTimeFormatter(formatString);
return formatter.format(date, **options**);
}
Is your feature request related to a problem? Please describe.
The problem is, it seems that the current implementation of datetime/format() doesn't allow to return a date in UTC. It is an important feature for logging purposes.
Describe the solution you'd like
I would like to be able to pass an options object to the formatter.format() function
Code : https://deno.land/std@0.214.0/datetime/format.ts?source=#L27
I see that the options.timeZone is already implemented in formatter.format()
Code : https://deno.land/std@0.214.0/datetime/_common.ts?source#L259
Describe alternatives you've considered
I didn't find an easy solution
The text was updated successfully, but these errors were encountered: