Thomas J Faughnan Jr 34c712c01c fix: parse date strings as UTC
For posts, comments, and other objects, the `published` attribute is a
string containing an ISO 8601 timestamp. This timestamp is UTC, though
it is not explicit in the string's contents. When the `Date` constructor
is used on such strings, they are parsed as though they are local
timestamps. According to [1]:

> When the time zone offset is absent, date-only forms are
> interpreted as a UTC time and date-time forms are interpreted as local
> time. This is due to a historical spec error that was not consistent
> with ISO 8601 but could not be changed due to web
> compatibility.

This patch explicitly appends a 'Z' to the `published` string when it is
used as the argument to the `Date` constructor.

[1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date
2023-07-28 20:02:01 -04:00
2023-07-28 20:02:01 -04:00
2023-07-04 13:08:58 -07:00
2023-07-26 15:53:47 -07:00
2023-07-22 10:54:05 -07:00
2023-07-08 10:33:35 -07:00
2023-06-21 14:53:24 -07:00
2023-07-24 08:48:24 -07:00
2023-07-28 16:29:42 -07:00
2023-06-24 13:00:09 -07:00
2023-07-26 15:23:12 -07:00
2023-06-21 14:53:24 -07:00
2023-07-22 12:50:03 -07:00
2023-07-02 15:04:10 -07:00
2023-06-21 14:53:24 -07:00
2023-07-04 13:31:23 -07:00
2023-07-14 15:58:37 -07:00
2023-07-08 14:54:02 -07:00

Photon

Jump to Self-hosting

An alternative web client for Lemmy with the UI of Xylo

Screenshots

Main

Communities

Dark Theme

Customization

Self-hosting

Put Xylo on your own domain for easier onboarding.

Running from image

# Use the env var PUBLIC_INSTANCE_URL to set the default instance URL.
docker run -p 8080:3000 -e PUBLIC_INSTANCE_URL=example.com ghcr.io/xyphyn/photon:latest

Running from repo

More unstable but latest features

Clone the repo:

git clone https://github.com/Xyphyn/photon && cd photon

and run the docker container:

docker build -t photon .

# Use the env var PUBLIC_INSTANCE_URL to set the default instance URL.
docker run -p 8080:3000 -it photon:latest

There you go, you now have an instance of Photon running.

S
Description
Photon (Lemmy web client) with a single-community mode, for thebitcoin.win. Fork of github.com/Xyphyn/photon, AGPL-3.0.
Readme AGPL-3.0
14 MiB
0 Stars 1 Watchers 0 Forks
Languages
Svelte 73.9%
TypeScript 24.8%
JavaScript 0.4%
CSS 0.3%
Python 0.3%
Other 0.1%