olahallengren / sql-server-maintenance-solution

SQL Server Maintenance Solution
https://ola.hallengren.com
MIT License
2.91k stars 755 forks source link

UTC date/time tokens #839

Open kschwartzatdattodotcom opened 4 hours ago

kschwartzatdattodotcom commented 4 hours ago

You currently support tokens for datetime parts (eg, year, hour, etc). These are supported in filenames/foldernames/etc. It would be nice to have the option of specifying UTC values instead of local-time values.

olahallengren commented 2 hours ago

How about a parameter called @TimestampTokensInUTC? It would be used for the tokens in the file names and directory structure.

It would not be used for the logging (as that is not using tokens).

kschwartzatdattodotcom commented 2 hours ago

Are you suggesting just one token? If so what would the granularity be? Right now you provide granularity, via multiple tokens, down to the microsecond (not that I use it…).

I would think that for file names, YYYYMMDD_HHMMSS would be sufficient.

And thanks very much for the quick response!

Ken Schwartz

olahallengren commented 2 hours ago

This would be a new parameter that would make all the timestamp tokens UTC tokens.

olahallengren commented 2 hours ago

There is another similar request, #679

kschwartzatdattodotcom commented 2 hours ago

Yes, I realized you meant a bit about 1 second after I hit “send”. 😊

And, yes, that would certainly take care of it, at least in terms of the use cases I need (and can think of).

Thanks again.

Ken