alt.hn

8/17/2026 at 4:37:54 PM

Sun Clock

https://sunclock.net/

by Gecko4072

8/17/2026 at 8:03:00 PM

Author of suncalc (the JS library behind the sun calculations) here — happy to see such a nice application of it! Heads up if the author's reading this — I recently released a major overhaul of the library that makes it a lot more precise: https://github.com/mourner/suncalc

by mourner

8/18/2026 at 1:05:14 PM

I just used Suncalc yesterday to add Sunrise/Sunset and Golden Hour to my PebbleOS NOAA Radar watchface[1]. Thank you for an amazing library; It's the first that I reach for every time I have a project with this need.

1. https://apps.repebble.com/2029ab9c84f946e1b125f8e0

by xd1936

8/18/2026 at 4:42:51 AM

Author of Sun Clock here — thanks for the library! I'll check out the new release soon and update.

by perilunar

8/20/2026 at 10:20:54 AM

Dumb question, but what does the green hand denote?

by wyclif

8/20/2026 at 1:00:25 PM

The green hand is the minutes hand.

by perilunar

8/18/2026 at 2:05:17 PM

It would be nice if I could just put a postal code in

by lokar

8/18/2026 at 2:13:20 PM

I am working on a clock app that keeps time the Roman Empire way (every day has twelve hours that start at sunrise and end at sunset, so the duration of each hour changes slightly each day), so this library would be extremely helpful. Thank you!

by prometheus76

8/17/2026 at 8:32:45 PM

what sorts of background texts/sources of info did you use?

edit: i think i have the dover book your readme mentions :)

by carterschonwald

8/17/2026 at 8:44:13 PM

Initially (about 15 years ago - it was my first ever open source library!) it was based on Astronomy Answers articles that are thankfully still live at https://www.aa.quae.nl/en/reken/zonpositie.html, but v2.0 specifically was rewritten to use the approach described in Jean Meeus' Astronomical Algorithms book.

by mourner

8/18/2026 at 1:03:14 AM

I did a similar one recently but have not been able to validate it's calculations against any other source. Thanks for posting the link to yours when I get time I'll compare and see if they match up. https://git.mikedilger.com/mikedilger/sunangle

by decoding

8/17/2026 at 9:57:20 PM

It looks like the "golden hour" may be hardcoded as the hour before sunset. May I suggest updating it to be based on the sun's position in the sky?

In high-northern and low-southern latitudes, the sun can stay close to the horizon for long stretches of the day depending on the season. For example, in Iceland in parts of the spring and fall, the golden hour lasts for most of the day - amazing for photography and just enjoying the scenery.

by TimTheTinker

8/17/2026 at 10:54:22 PM

In northern Alaska it can last most of the day in the winter, and most of the night in the summer.

by mordechai9000

8/17/2026 at 6:24:34 PM

I love it. It'd be nice if I could click points on a map and see the difference to my local one as well. Or in the calendar view if it'd show a copy of the clock (i.e. coloring not current hand positions) for the time I'm hovered over.

by zamadatix

8/17/2026 at 7:58:48 PM

That’s actually pretty close to what I ended up building.

For the first one, I skipped the map and went with search + saved cities instead. All your saved places sit on the same 24-hour dial, so you can see the difference from your local time at a glance without doing the timezone math. The upside is that it works completely offline and fits nicely on Apple Watch too.

Your second suggestion is the part I only got halfway right. You can move the dial in 15-minute increments and the daylight/twilight colouring changes with it. There’s also a calendar where you can jump to any date and time and see what the solar state is in every saved city, but right now that’s shown in rows rather than by recolouring the clock itself.

I like your version better though, hovering/scrubbing a time and having the whole clock recolour for that moment would make a lot more sense. I’m going to add that to the list.

I’m the developer, btw: https://apps.apple.com/app/id6797192832

by duman

8/17/2026 at 9:43:41 PM

A watch face would be fun.

by michael1999

8/18/2026 at 12:08:30 AM

Yeah I want this on my Pebble time 2 sq!

by acidburnNSA

8/19/2026 at 12:29:45 PM

Your link doesn't work :(

by BtM909

8/17/2026 at 7:13:54 PM

Neat. One of my favourite sites, which also shows daylight, is WeatherSpark[0], obviously focused on weather and it allows you to compare locations based on yearly rainfall, cloud cover, muggy conditions, all sorts of stuff. Always check it when going on vacation or relocating.

[0] https://weatherspark.com/

by fer

8/18/2026 at 9:38:33 AM

Thanks for posting this, I remember seeing it somewhere some time ago but didn't bookamrk the site and couldn't remember the name. It has some very nice plots (and city comparison) for data freaks like myself :-)

by NKosmatos

8/17/2026 at 6:37:50 PM

Also made something like this called Sun Path which tracks where the sun is through centuries and how the path deviates ever so slowly.

Plus there are all the equinoxes and solstices.

https://pilgrimapp.org/sunpath/

by momentmaker

8/17/2026 at 6:46:01 PM

Dragging the globe around isn't working on touch; it feels like it's missing touch-action: none

by sheept

8/17/2026 at 7:12:48 PM

Thanks for the note. I just fixed it.

by momentmaker

8/17/2026 at 6:24:03 PM

It must be clock-making time... I built a 24-hour clock a few days ago but in base-12 and with 72 seconds per minute (to reuse the outer 24-hour dial, with 3 subdivisions to make it closer to the normal second)

https://jasonincanada.github.io/24-hour-base-12-clock.html#w...

by jasonincanada

8/17/2026 at 7:49:10 PM

interesting

by babu_mick

8/17/2026 at 6:49:45 PM

I've been wanting to build this exact clock for awhile now. My feature request would be to include a timeline at the bottom of the page that I can scroll back and forth through days of the year to see everything shift.

by seanalltogether

8/18/2026 at 4:22:29 AM

Author here — I'm thinking of adding something like that to the calendar page, or adding a separate 'carpet plot' of times over the year.

by perilunar

8/18/2026 at 10:47:17 AM

Sorry, not giving my position. Would be nice if i could set an address, or coordinates (for example i may not care for my particular location)

by monegator

8/18/2026 at 11:07:05 AM

It would be even cooler to be able to set a point on a map and watch the clock change as the point is dragged around...

by globular-toast

8/18/2026 at 6:50:34 PM

And it's handy for people who wanna know what the sun is going to do elsewhere too!

by cerebrum01

8/17/2026 at 5:51:50 PM

Nice. I've been making a version of this that I submitted to ycombinator, testing the thesis "If we schedule our life around the sun including afternoon naps" we perform better.

Check it out and give me feedback. It has a long ways to go.

https://sunsignal.app

by mannanj

8/18/2026 at 8:54:41 AM

Makes me want to build this physically with a color e-ink display + a standardish 24h clock mechanism

by miniBill

8/18/2026 at 10:02:55 AM

go for it - make it a GitHub with a link to the shopping cart etc.

by guest__user

8/18/2026 at 7:25:07 AM

There is also an IRL variation of one-handed clocks that someone launched back in 2011: https://thepresent.is/collections/the-shop/products/the-pres...

The absence of a simple, single-handed watch face like Day or Sun Clock is my biggest objection to Apple Watch refusing to allow publicly-created third-party face designs.

by altairprime

8/18/2026 at 8:56:16 AM

[dead]

by geera

8/17/2026 at 8:19:26 PM

This is great. Reminds me of the Solar Dial watch face on my Apple Watch.

by tizio13

8/18/2026 at 12:21:37 AM

Clocks like this are fun. I coded one but couldn’t decide how to handle the corner cases where the sun rises but does not set (and vice versa). You also have to decide if you’re showing the time that the sun rose today or if it should be tomorrow once you’ve already passed that time. Either way, at a certain point you’ll see the UI shift. At moderate latitudes it makes little difference but the effect can be quite extreme depending on the latitude and time of year.

by staplung

8/18/2026 at 4:14:57 AM

> how to handle the corner cases where the sun rises but does not set (and vice versa)

In practice it doesn't matter: you get a thin sliver of twilight between solar midnight and sunrise or sunset, and a 'Sunset: Does not occur' message in the text info. In such cases the sunrise/sunset arc (sector?) is pretty broad anyway.

> or if it should be tomorrow once you’ve already passed that time

Yes. I chose to recalculate the times midnight.

> Either way, at a certain point you’ll see the UI shift

Yes, but it's usually not dramatic. A few minutes time and fractions of a degree each day. The biggest shift occurs when Daylight Saving time changes — you get a big 15° rotation in the display. Most people are asleep when that happens, but it's cool to watch it jump.

by perilunar

8/18/2026 at 6:06:29 AM

I'd want to make it continuous, but then it wouldn't actually show you proper sunset/sunrise times until the moment they are actually happening, which is probably sacrificing function for form. You could also hide the shift by making the whole thing "tick" rather than having some parts continuous and some quantised.

by globular-toast

8/17/2026 at 5:44:04 PM

Let me choose location manually.

by dvh

8/17/2026 at 6:56:51 PM

I wish my browser let me do this by default. Rather than "let this site know your location?" it should be "select a location to give to this site".

(I'm sure there are extensions and/or developer options that do this, but it's the default I want)

by Retr0id

8/17/2026 at 6:08:42 PM

You can set latitude and longitude after opening settings with the gear icon.

by divbzero

8/18/2026 at 1:12:58 PM

Seconded.

I'm certainly not giving my exact GNSS coordinates to any random scrote who askes for them. Frankly I'm amazed some people do this.

by GJim

8/17/2026 at 5:52:09 PM

you can use my version sunsignal.app and enter a zip code.

by mannanj

8/17/2026 at 5:53:42 PM

https://editor.p5js.org/rhemalinder/full/im3tyPBDW - I made this one for myself and it's pretty similar.

I have this hard-coded to south dakota, but it looks like this and I made it a while ago. Same idea, except I turn it such that "solar noon" is at the top.

Think 12 noon is really "high noon" or solar noon? Nope, not unless you are in the center of a timezone!

by rhema

8/17/2026 at 6:35:10 PM

The objective time of "local noon" also varies due to the Earth's orbit not being a perfect circle, and the Earth's axis being tilted with respect to the plane of its orbit. The variance is described by the equation of time:

https://en.wikipedia.org/wiki/Equation_of_time

by GolfPopper

8/17/2026 at 6:07:35 PM

> Nope, not unless you are in the center of a timezone!

… and you do not live with daylight saving time.

by divbzero

8/17/2026 at 7:17:13 PM

Or one of those places that ignores its assigned time zone.

There are places in the western U.S. where entire towns operate on their own time, and the only place you'll find a "correct" clock is in the Post Office. Not even in City Hall.

by reaperducer

8/17/2026 at 10:18:52 PM

Unrelated but a little related (semi-shameless plug?)- I made a small weather web-app that also plotted daylight hours as a secondary feature.

Its really weather over the next 12 hours on the primary ring, and day/night transition on the inner.

https://donohoe.dev/weather/

by donohoe

8/17/2026 at 11:22:17 PM

At last, someone thought of giving the ambient temperature in kelvin

by Arodex

8/18/2026 at 1:21:15 PM

I just give the people what they want

by donohoe

8/17/2026 at 8:34:29 PM

Been using https://sundial.page recently for weather

by bpev

8/17/2026 at 10:24:11 PM

Why are some days blue and others are gray? Doesn't seem to correlate to cloudiness or precipitation

by csallen

8/17/2026 at 11:56:04 PM

idk. Not the dev, but for me it's seemed pretty correlated to cloudiness.

by bpev

8/17/2026 at 6:12:00 PM

I would prefer if it showed a regular 12 hours clock face and show the upcoming sunrise or sunset, or two faces one for each.

by karmakaze

8/17/2026 at 6:07:25 PM

This is neat! Would love the ability to make "true noon" be at the top of the clock, instead of 12.

by dilap

8/17/2026 at 10:57:07 PM

Very nifty little app. It is such a standard thing nowadays, but the dynamic UI rescaling (to a point anyway) makes it nice to stick on the side and watch as the sun goes down. Kudos to the dev.

by tygon

8/18/2026 at 6:08:37 AM

This needs a way to manually set the location. Browser location is so off sometimes. Without that is useless for me.

by edelind

8/18/2026 at 6:56:36 AM

You can: there's an option in the settings panel (the gear icon on the top right)

by perilunar

8/17/2026 at 8:09:08 PM

Nice. I made my solar clock here: svennidal.is/solarclock

I'm currently in Iceland and I've been using my clock as my main clock since the Icelandic clock is set to be almost one and half hour to early. I've never really shared it so that is why it's just hardcoded to my location haha.

by svennidal

8/17/2026 at 6:47:20 PM

It'd be neat if you could pan a slider through the year to see the sunrise sunset times change

by sheept

8/18/2026 at 7:05:06 AM

For an alternate version that packs sunrise and sunset into an easier-to-read 12-hour clock face, check out my https://dayspiral.com

by charliewallace

8/18/2026 at 7:04:02 AM

For an alternate version that packs sunrise and sunset into an easier-to-read 12-hour clockface, check out my https://dayspiral.com

by charliewallace

8/18/2026 at 6:35:24 AM

Nice UI ideas in that one.

Here my one from a few years ago. With whole year overview slider https://daylight.franzai.com/

by franze

8/17/2026 at 7:39:42 PM

Love it!

One weird thing: the author of this clock/calendar portrays the year rotating clockwise (click on the calendar icon in top left to see the "annual" calendar): January in 12 to 1 o'clock, February in 1 to 2 o'clock, etc. and December in 11 to 12 o'clock.

In a poll of some close friends recently, we found out that most of us (>80% including myself) had always mentalized the year rotating counter-clockwise (starting from January at 12 to 11 o'clock, Februay at 10 to 11 o'clock etc. and finally December in 1 to 12 o'clock.)

Bizarely none of us could explain why we had such weird anti-clockwise mental image of the annual cycle, but all who viusalized the year running counter-clockwise said they had done so for as long as they could remember.

by vesinisa

8/17/2026 at 9:17:37 PM

I actually have exactly a clock as a mental model of the year and the seasons. December is 12 o' clock.

But weirdly, I dont have a mind's clock to represent the day. Precisely because it feels to me that the clock shape is unfit to show time. Because 03:00am feels wildly different from 03:00pm. My mental representation is a 3d spiral slightly offset and looping back on itself. So imagine two clockfaces when looking from up top, seethrough. The bottom one is a bit to the left so you can see both well. Each consecutive number goes a bit higher. After 12 midnight the numbers quickly decend down back to 06:00am. I have this image for as long as.I remember.

by pineaux

8/18/2026 at 4:49:34 AM

I wonder if that's a common thing generally or not. Definitely I should add it as an option though. Also whether the year starts at the top or bottom of the dial.

The planets do go around the Sun anticlockwise when viewed looking down from above the North pole [0], and most diagrams show it that way, so maybe that's where the idea comes from?

0. e.g. https://en.wikipedia.org/wiki/Year

by perilunar

8/18/2026 at 7:01:50 AM

Yes, this has to be where the picture originates. Given that almost all maps show the north facing up, picturing the Earth rotating anti-clockwise around the Sun throughout the year makes sense. A bit similar to how clocks for the times of day run clockwise probably because this aligns with the rotation of a sundial placed in the Northern hemisphere. In the Southern hemisphere, a sundial runs anti-clockwise.

Although, converse arguments can be made for both - even if we assume an observer located in the north. If we do indeed picture the Earth rotating in space from the outside - it actually rotates counterclockwise around its axis with the north up. So should day clocks actually run "backwards"? And the "fixed" background of distant stars seem to rotate around a northern observer in the clockwise direction throughout the year - so the image of the year rotating clockwise is just as correct.

Everything seems relative to the prespective chosen.

by vesinisa

8/17/2026 at 7:45:16 PM

Interesting, I don’t have a circular mental image of the year at all. It’s more like a continuous line — the summers are light and the winters are dark(er) — where the previous year doesn’t coincide with the next year. Same for the week (and the month, but the months have different lengths anyway). Also not for the day, which takes two revolutions of the clock. Does anyone visualize the day as two circles? Probably not.

by layer8

8/17/2026 at 8:23:21 PM

Agree. This is the first time I had thought about it this way and the clock representation seems fine.

Oddly the year is the only thing where I think I have a good 3D mental model without really thinking about it. Not sure if this makes sense to others but right now we are about 11/12ths of the way to the autumnal equinox and you can imagine the Earth’s tilted axis almost perpendicular to the arriving sunlight. I think of this as if I were observing from the sun so the axis is pointing up (north) to the left.

by cogogo

8/17/2026 at 9:16:44 PM

I picture day cycle in a single 24 hr counterclockwise loop. I’m always interested to learn about other people’s internal mental image frameworks! So fascinating.

by Ostrogoth

8/17/2026 at 9:12:22 PM

I picture annual calendar the almost the same way (counterclockwise), although its an asymmetrical oval, and months have associated colors (i.e. December navy blue, January maroon/brown, February ice blue, March true maroon…August golden or wheat yellow). I don’t know why, but that’s been my mental image since childhood.

by Ostrogoth

8/17/2026 at 7:53:47 PM

I visualize the year clockwise, but with summer at the top, and the new year at the 6 o'clock position. I'm not sure why, but I think it just makes more sense to me to think of spring as rising, and "fall" as descending. I guess that convention would work better in the southern hemisphere.

by fwipsy

8/17/2026 at 11:05:50 PM

Right. If viewed with the north pole up, Earth indeed rotates counterclockwise around the Sun. Not sure if it would be any different for someone living on the southern hemisphere though, as all the maps used globally have the North up and the South down.

by vesinisa

8/18/2026 at 4:28:58 AM

Same here, but i'm in the southern hemisphere, so summer is at the top already.

by perilunar

8/17/2026 at 7:53:09 PM

Did you go to the same elementary school?

by insomniacity

8/17/2026 at 10:51:58 PM

No but possibly used same schoolbooks. An image or such in an old schoolbook could indeed seed such a visual idea.

by vesinisa

8/19/2026 at 8:23:24 AM

nicely designed, thank you. I would love if there is a 12-hour version of it, just to look like a watch, and update sun rise, set, moon, etc. times accordingly.

by dalleh

8/18/2026 at 3:02:58 AM

It would be great to have other visible planets like Jupiter and Venus in the dial

by SoulMan

8/18/2026 at 10:49:16 AM

it would be nice to have it as widget both in mobile / desktop machine

by anshulsahni

8/18/2026 at 9:50:07 AM

would love this integrated into my iphone alarm clock

by yoyomo

8/17/2026 at 5:47:54 PM

Man fuck Apple for not allowing custom Apple Watch faces >:(

Always the crippled operating system limiting the potential of their amazing hardware

by Razengan

8/17/2026 at 6:21:51 PM

The “Solar Dial” face does pretty much what the site does.

by el_benhameen

8/18/2026 at 7:32:05 AM

It may do equivalent functionality but it sure doesn't do equivalent aesthetic.

by altairprime

8/17/2026 at 7:05:46 PM

This is already my default watch face on Apple Watch

by animal_spirits

8/18/2026 at 3:19:43 PM

amazing !

by weberress

8/17/2026 at 6:40:49 PM

nice one

by nipunaeka89