ShellSpells
  • 🧙‍♂️Welcome!
    • ShellSpells
    • FAQs
    • License & Disclaimer
  • 🐧Linux
    • System Ops
      • Transcripts
      • Help
      • System Info
        • Date/Time
        • System Details
        • Patches & Updates
        • Init System Identification
        • Hostname / Host ID
        • Variables
        • Hardware & Resources
      • Filesystem
        • Traverse & Enumerate
        • Drives & Partitions
        • Shares
        • Packages
        • Connected Devices
        • Kernel Modules (Drivers)
      • Users & Groups
        • Enumerate
        • Modify
      • Network
        • Enumerate
        • Modify
      • Scheduled Jobs
        • Enumerate
        • Modify
      • Processes
        • Enumerate
        • Modify
        • Custom Script and Shared Object
        • Process I/O Redirection
      • Services
        • Enumerate
        • Modify
        • Create a Service
      • Startup/Boot Scripts
        • Enumerate
        • Modify
      • Security
        • Antivirus
        • Firewall
        • SSH Keys
      • History & Logs
        • History
        • Logs
    • File Ops
      • Search
        • Filename
        • Content
        • Users (Owners)
        • Time
        • Size
        • Permission
        • Hidden Files
        • Inode
        • Find + Exec
        • Notes
      • Enumerate Metadata
      • Modify Metadata
      • Read Content
      • Modify Content
      • Extract Content
      • Sort / Compare / Count
      • Move
      • Copy
      • Execute
      • Hash
      • Encode/Decode
      • Compress/Decompress
      • Working With Weird Filenames
    • Terminal Ops
      • Keyboard Shortcuts
      • Tmux Shortcuts
  • 🪟Windows
    • System Ops
      • Transcripts
      • Help
      • System Info
        • One-liners
        • Date/Time
        • System Details
        • Hotfixes
        • Domain or Workgroup
        • Data Execution Prevention
        • Variables
        • Hardware & Resources
      • Filesystem
        • Traverse & Enumerate
        • Drives & Partitions
        • Installed Software
        • Drivers
        • Shares
      • Registry
        • Enumerate
        • Modify
        • Forensically Relevant Keys
      • Users & Groups
        • Enumerate
        • Modify
      • Network
        • Enumerate
        • Modify
      • Scheduled Tasks
      • Processes
        • Enumerate
        • Modify
      • Services
        • Enumerate
        • Modify
      • Autorun / Startup
        • Enumerate
        • Modify
      • Security
        • Permissions
          • Enumerate
          • Page
        • Antivirus
        • Firewall
          • Enumerate
          • Modify
        • Audit Policies
        • Remoting
          • Enumerate
          • Modify
          • Registry Locations
        • Stored Credentials
      • Remote Command Execution
      • Active Directory
        • Enumerate
        • Modify
      • History & Logs
        • History
        • Logs
      • PowerShell Config
      • Scripting
      • WMIC Notes
    • File Ops
      • Search
        • Filename
        • Time
        • Size
        • Permissions
        • Attributes
        • Wildcarding
      • Enumerate Metadata
        • One Liners
        • Users (Owners)
        • Timestamps
        • Size
        • Permissions
        • Attributes
      • Modify Metadata
        • Change Owner
        • Timestamps
        • Size
        • Attributes
      • Read Content
      • Modify Content
        • Overwrite
        • Insert
        • Append
        • Replace / Remove
        • Convert Case
        • Alternate Data Streams
      • Extract Content
      • Sort / Compare / Count
        • Sort
        • Count
        • Compare
      • Move
      • Copy
      • Execute
      • Hash
      • Encode/Decode
      • Compress/Decompress
      • Working With Weird Filenames
      • Output Formatting / Filtering
      • File Formatting
      • Operators
  • ⛓️Network
    • Traffic Manipulation
      • iptables
        • Option List
        • General Commands
        • Filter Tables
        • NAT
        • Mangle
        • Filter for SSH Traffic (Example)
      • nftables
    • Packet Capture
      • Syntax
      • TCPDump Examples
    • Packet Analysis
      • Wireshark
  • 🚗Maneuver
    • SSH
    • Control Sockets
    • RDP
    • Windows Port Proxy
  • 🛩️Data Transfer
    • SCP
    • FTP
    • Netcat
      • Netcat Relays
    • Server Interactions
    • Alternate Methods
  • 🪄REGEX
    • Examples
Powered by GitBook
On this page
  • Commands
  • Date & Time
  • Timezone
  • Registry Locations

Was this helpful?

  1. Windows
  2. System Ops
  3. System Info

Date/Time

Commands

Date & Time

date /t && time /t

Date and time (/t prevents changing value)

cmd /c "date /t && time /t"

Date and time

wmic os get localdatetime

Date and time

wmic path Win32_LocalTime get

Date and time

powershell Get-Date

Date and time

powershell [System.DateTime]::Now

Date and time

powershell [System.DateTime]::UtcNow

Date and time in UTC

powershell (Get-Date).ToLongDateString()

Date in long format

powershell (Get-Date).ToLongTimeString()

Time in long format

powershell (Get-Date).DayOfWeek

Day of the week

powershell Get-WmiObject Win32_LocalTime

Time

powershell Get-CimInstance Win32_LocalTime

Time details

Get-CimInstance -ClassName Win32_OperatingSystem | Select-Object LocalDateTime
Get-CimInstance -ClassName Win32_OperatingSystem | Select-Object -ExpandProperty LocalDateTime
Get-CimInstance -ClassName Win32_LocalTime | Select-Object -Property Hour, Minute, Second, caption

Timezone

tzutil /g

Timezone

wmic timezone get caption

Timezone

wmic path Win32_TimeZone get Caption

Timezone

powershell Get-TimeZone

Timezone

wmic os get currenttimezone /format:list

Timezone details

powershell [System.TimeZoneInfo]::Local

Timezone details

powershell Get-WmiObject Win32_TimeZone

Timezone details

powershell Get-CimInstance Win32_TimeZone

Timezone details

[System.TimezoneInfo]::Local

Timezone details

Registry Locations

Time Zone Information: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation This key contains information about the currently set timezone, including the name, bias, and daylight saving time settings.

Time and Date Formats: HKEY_CURRENT_USER\Control Panel\International This key stores user-specific settings related to date and time formats, such as short date format, long date format, time format, and first day of the week.

Internet Time Settings: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers This key contains information about the Internet time servers that Windows can synchronize with.

Automatic Time Synchronization Settings: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters This key includes parameters for the Windows Time service, which is responsible for synchronizing the computer's clock with a network time protocol (NTP) server.

Daylight Saving Time Update Configuration: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones This key contains subkeys for each time zone, including information about daylight saving time rules and adjustments.

User-specific Time Zone Settings (if different from the system default): HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones Similar to the system-wide time zone settings, but specific to the current user.

PreviousOne-linersNextSystem Details

Last updated 1 year ago

Was this helpful?

🪟