A lightweight, Go app that publishes your current local time in your Discord Rich Presence status in real-time. I built this because I liked this feature that slack has which shows your local time to anyone who clicks on your profile. Discord lacked this due to their stance on privacy lol.
| Slack | Discord |
|---|---|
![]() |
![]() |
This app creates a Discord Rich Presence that shows:
- **It's **: Your local time in HH:MM format (e.g., "It's 3:25 PM EST")
- 📅 Date: Current date (e.g., "🗓️ Mon, Jun 23")
- Live Updates: Automatically refreshes every 30 seconds
Your Discord profile will display this as a "Playing" status that your friends can see!
- No external dependencies beyond standard library
- Communicates directly with Discord using the official RPC protocol
- Prompts for Discord Client ID if not provided
- Works on Windows, macOS, and Linux
- Single binary with no complicated build setup
- You can download the latest release from https://github.com/siddarthkay/discord-show-local-time/releases
- just unzip the binary that corresponds to your Environment
- Run the executable and it should connect to your Discord Desktop App
- Discord Desktop App (Rich Presence doesn't work with browser Discord)
- A Discord Application ID (free to create)
- Go to Discord Developer Portal
- Click "New Application"
- Give it a name (e.g., "My Time Display")
- Copy the Application ID from the General Information page
Tip: The Application ID is an 18-19 digit number like
1234567890123456789
In Discord Desktop App:
- Go to Settings → Activity Privacy
- Enable "Display current activity as a status message"
# Option 1: Set environment variable
export DISCORD_CLIENT_ID="your_application_id_here"
./discord-time-presence
# Option 2: Interactive prompt (app will ask for Client ID)
./discord-time-presenceDiscord Time Rich Presence
=============================
Connecting to Discord using Client ID: 1234567890123456789
Connected to Discord!
Starting time updates (Ctrl+C to stop)...
Updated presence: 3:25 PM EST on Mon, Jun 23
Updated presence: 3:25 PM EST on Mon, Jun 23
Updated presence: 3:26 PM EST on Mon, Jun 23
Your Discord profile will then show:
- Playing: [Your App Name]
- Details: "It's 3:25 PM EST"
- State: "🗓️ Mon, Jun 23"
# Check Go version
go version # Should be 1.25+# Clone the repository
git clone https://github.com/siddarthkay/discord-show-local-time.git
cd discord-show-local-time# Current platform
make build
# Build and code sign for macOS (requires Apple Developer certificate)
make build-signedIf you're using Nix or NixOS, you can run this application without installing Go or other dependencies:
# Run directly with nix (requires flakes)
nix run github:siddarthkay/discord-show-local-time
# Or clone and run locally
git clone https://github.com/siddarthkay/discord-show-local-time.git
cd discord-show-local-time
nix run# Build the application
nix build
# The binary will be available at ./result/bin/discord-time-presence
./result/bin/discord-time-presence# Enter development shell with Go and make available
nix develop
# Then use standard make commands
make build
make runNote: Nix commands require experimental flakes feature. Enable with:
nix --extra-experimental-features "nix-command flakes" <command>
To eliminate macOS security warnings, the project supports automatic code signing:
- Obtain Apple Developer Certificate: You need an Apple Developer account and certificate
- Check Available Identities:
make codesign-info
- Set Custom Identity (optional):
# Override default identity in Makefile or set environment variable export CODESIGN_IDENTITY="Your Developer Name (TEAM_ID)"
# Build and sign single binary
make build-signed
# Build and sign all macOS releases
make release-all-signed
# Check current configuration
make codesign-infoThe GitHub Actions workflow automatically code signs macOS binaries when:
- Building from a git tag (release)
- Required secrets are configured in your GitHub repository
APPLE_CERTIFICATE_P12: Base64 encoded .p12 certificate fileAPPLE_CERTIFICATE_PASSWORD: Password for the .p12 certificate
-
Export your certificate as .p12:
- Open Keychain Access
- Find your "Developer ID Application" or "Apple Development" certificate
- Right-click → Export → Save as .p12 file
-
Convert to Base64:
base64 -i your-certificate.p12 | pbcopy -
Add to GitHub Secrets:
- Go to repository Settings → Secrets and variables → Actions
- Add
APPLE_CERTIFICATE_P12with the base64 content - Add
APPLE_CERTIFICATE_PASSWORDwith your certificate password
- Developer ID Application: Best for public distribution (recommended)
- Apple Development: Works but shows as "development" in signatures
Note: If secrets are not configured, the workflow will build unsigned binaries with a warning.
*Required unless provided via interactive prompt
Linux/macOS:
export DISCORD_CLIENT_ID="1234567890123456789"
./discord-time-presenceWindows (Command Prompt):
set DISCORD_CLIENT_ID=1234567890123456789
discord-time-presence.exeWindows (PowerShell):
$env:DISCORD_CLIENT_ID="1234567890123456789"
.\discord-time-presence.exeCreate /etc/systemd/system/discord-time-presence.service:
[Unit]
Description=Discord Time Rich Presence
After=network.target
[Service]
Type=simple
User=your-username
WorkingDirectory=/path/to/discord-time-rich-presence
ExecStart=/path/to/discord-time-rich-presence/discord-time-presence
Restart=always
RestartSec=3
Environment=DISCORD_CLIENT_ID=your_client_id_here
[Install]
WantedBy=multi-user.targetEnable and start:
sudo systemctl daemon-reload
sudo systemctl enable discord-time-presence
sudo systemctl start discord-time-presence
sudo systemctl status discord-time-presenceCreate ~/Library/LaunchAgents/com.yourname.discord-time-presence.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.yourname.discord-time-presence</string>
<key>ProgramArguments</key>
<array>
<string>/path/to/discord-time-presence</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>EnvironmentVariables</key>
<dict>
<key>DISCORD_CLIENT_ID</key>
<string>your_client_id_here</string>
</dict>
</dict>
</plist>Load the service:
launchctl load ~/Library/LaunchAgents/com.yourname.discord-time-presence.plist- Open Task Scheduler
- Click Create Basic Task
- Name: "Discord Time Presence"
- Trigger: When I log on
- Action: Start a program
- Program: Path to your
discord-time-presence.exe - Add arguments: (none needed if using environment variables)
- Finish
"Failed to connect to Discord"
- Ensure Discord Desktop app is running (not browser)
- Check that Rich Presence is enabled in Discord Settings → Activity Privacy
- Try restarting Discord completely
- Verify your Client ID is correct (18-19 digits)
"DISCORD_CLIENT_ID environment variable required"
- Set the environment variable or let the app prompt you
- Make sure there are no extra spaces in your Client ID
Rich Presence not visible:
- Enable "Display current activity as a status message" in Discord
- Make sure you're using Discord Desktop (not web)
- Check that another Rich Presence app isn't conflicting
- Try running Discord as administrator (Windows)
"go: command not found"
- Install Go from golang.org
- Add Go to your PATH
macOS: "cannot be opened because the developer cannot be verified"
Note: Official releases from GitHub are code-signed and should not show this warning.
If you encounter this issue with a manually built binary:
# Allow the app to run
sudo spctl --add discord-time-presence
# Or run with:
sudo xattr -d com.apple.quarantine discord-time-presenceFor developers building from source on macOS:
# Build with code signing (requires Apple Developer certificate)
make build-signed
# Build all platforms with macOS code signing
make release-all-signed
# Check available code signing identities
make codesign-infoLinux: Permission denied
chmod +x discord-time-presenceThis project is licensed under the MIT License - see the LICENSE file for details.
If this project helped you, please give it a star! ⭐
- Issues: GitHub Issues
This project implements the Discord IPC Rich Presence protocol directly without external dependencies. For developers interested in the protocol details:
- Discord RPC (Official): github.com/discord/discord-rpc
- IPC Protocol Specification: Hard Mode Documentation
- Community Protocol Documentation: robins.one/notes/discord-rpc-documentation
- Discord for providing the Rich Presence API
- The Go community for excellent tooling and libraries
Note: This application is not affiliated with or endorsed by Discord. Rich Presence is a feature provided by Discord for developers.

