dotnet-timestamp
1.0.0
dotnet tool install --global dotnet-timestamp --version 1.0.0
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local dotnet-timestamp --version 1.0.0
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=dotnet-timestamp&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package dotnet-timestamp --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
dotnet-timestamp
dotnet-timestamp is a .NET global tool that prints timestamps and converts them across time zones from the command line. The installed command name is dtstamp.
Install
dotnet tool install -g dotnet-timestamp
Usage
- Show the current time (defaults to UTC and round-trip format):
dtstamp now - Use a custom format and time zone (C# standard format strings,
DateTimeOffsettime zone IDs):dtstamp now --format "yyyy-MM-dd HH:mm:ss" --timezone Asia/Tokyo - List available time zones on the system:
dtstamp timezone --list - Convert a timestamp between time zones:
dtstamp timezone convert --datetime "2024-09-01T12:00:00" --from UTC --to America/New_York --format "yyyy-MM-dd HH:mm:ss zzz" - Convert a datetime to Unix timestamp (milliseconds since 1970-01-01 00:00:00 UTC):
dtstamp unix --datetime "2024-09-01T12:00:00Z" - Get the current Unix timestamp:
dtstamp unix - Convert a Unix timestamp to datetime:
dtstamp unix convert 1725192000000 - Convert a Unix timestamp to datetime with custom format:
dtstamp unix convert 1725192000000 --format "yyyy-MM-dd HH:mm:ss"
The default command runs now.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.