Comments (8)
Perhaps a checkbox in the settings to toggle between local time and UTC or maybe allow the user to click the time to toggle it between UTC and local time?
moment.js provides a .utc()
method which seems to do the trick.
I don't mind writing this up and doing the PR if you want?
from atom-clock.
Maybe this can be integrated with the time format. However, in order to do that, a regex-like format should be parsed. I'm thinking about it, I've had much to do at work so I left this project a bit behind. I'll see if I can get some time to work on the timezone
feature.
from atom-clock.
Not currently, however it doesn't seem like it would be too difficult to support offsets like "+05:00", see documentation here, but if you wanted to be able to set things like "Australia/Sydney" you should use moment-timezone.
from atom-clock.
This could also be a good idea. I'm thinking, the tooltip could also be tweaked so it shows the time in a different timezone. Still not sure.
from atom-clock.
Using moment-timezone seems simple enough:
var moment = require('moment-timezone')
var timezone = "America/New_York"
var locale = "en"
var format = "h:mm a Z"
var timeLocal = moment().locale(locale).format(format)
var timeTimezone = moment().tz(timezone).locale(locale).format(format)
console.log(`Local: ${timeLocal}`)
console.log(`${timezone}: ${timeTimezone}`)
Local: 5:27 pm +01:00
America/New_York: 12:27 pm -04:00
from atom-clock.
Related, I would love to be able to have the clock display UTC so I know what time it is on my servers.
from atom-clock.
I created a timezone
branch with the first version of the timezone feature. However, the UTC option is available as timezone, so probably the UTC settings item can be removed. This would limit the customization for UTC only. A CSS class could still be added whenever the timezone is changed from the default one.
from atom-clock.
could there also possibly be an update to display two timezones if possible? possibly to have one in UTC and the other in your local? Or to have a UTC Offset field with that?
from atom-clock.
Related Issues (20)
- Tooltip alert for UTC time HOT 7
- Just an idea I had now with the last update... HOT 2
- README image are no longer displayed in Atom settings view HOT 2
- Failed to activate the ide-python package HOT 3
- naziv HOT 1
- Day Fraction HOT 1
- Add a hot key to have a notification HOT 1
- Uncaught Error: Cannot find module 'moment' HOT 2
- Uncaught TypeError: Cannot read property 'enable' of undefined HOT 3
- failed to activate the status-bar package when atom-clock enabled HOT 4
- Function.extractParams is deprecated. HOT 2
- Failed to load the atom-clock package HOT 2
- Incorrect local time HOT 5
- pjkmô
- Add possibility to copy time into clipboard HOT 6
- customizing HOT 5
- Suggestion HOT 4
- 'tk' locale not working
- Wrong screenshot for 12 hour
- HTMLDocument.registerElement is deprecated.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from atom-clock.