Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| de2e79491c | |||
| b10810b120 |
@@ -1,31 +0,0 @@
|
||||
# WebClock
|
||||
It's a clock. It runs in your browser.
|
||||
#### Description
|
||||
A simple clock for your web based timekeeping needs.
|
||||
Includes the abality to set the timezone you want if the one your browser chooes isn't what you need.
|
||||
The time will appear not only on the main page but also in the page's title so you can leave the page and still keep an eye on the time.
|
||||
#### Requierments
|
||||
```
|
||||
php - I'm running it on a minimum of 5.6 so that or anything newer should work
|
||||
a webserver - I use apache. It's nice.
|
||||
A javascript interpriter - Basicaly a modernish webbrowser.
|
||||
```
|
||||
### Install
|
||||
1. git clone into a directory accessable by your webserver.
|
||||
`git clone https://efrick.ddns.net/git/20xd6/WebClock.git`
|
||||
2. Optional steps
|
||||
1. Edit `clock.php` to point to your root CSS files. _It points to a css file called `styles.css` in the root directory. If this is not your root css file please edit it._
|
||||
2. Add a symlink from `clock.php` to a file called `index.php`.
|
||||
`ln -s clock.php index.php` _Most webservers will look for an index file (`index.html` or `index.php` for example) in any folder you open. Adding this symlink will inable you to link to the direcoty rather than `clock.php` without messing with the configuration of the webserver._
|
||||
#### Note:
|
||||
There is a small privacy concern. Because this clock is using PHP to creat the inishal time entry and because this is using the `date()` function in PHP to do this it will reveal what timezone the server running it is set to.
|
||||
### ToDo
|
||||
- [x] Add a differentiator from the selected timezone and the original timezone.
|
||||
- [x] Display original timezone's time.
|
||||
- [x] Display the offset of the two selected timezones.
|
||||
- [ ] Add a timer.
|
||||
- [ ] Multiple clocks for tracking regions. _this is sort of implemented with the display original timezone feature but not compleatly and not how I want it._
|
||||
|
||||
#### Licening
|
||||
##### GPLv2
|
||||
A copy of the GPLv2 can be fond [here](https://efrick.ddns.net/GPLv2.txt).
|
||||
@@ -18,12 +18,14 @@ function startTime(){
|
||||
+ current_time.toLocaleString('en-US',
|
||||
{timeZone: current_tz,
|
||||
hourCycle:'h24',
|
||||
timeStyle:'long',
|
||||
hour: '2-digit',
|
||||
minute:'2-digit',
|
||||
second:'2-digit',
|
||||
timeZoneName:'short'});
|
||||
document.getElementById('time_body').innerHTML = current_time.toLocaleString('en-EN' ,{
|
||||
timeZone: current_tz,
|
||||
dateStyle:'long',
|
||||
hourCycle:'h24',
|
||||
weekday:'short',
|
||||
month:'short',
|
||||
@@ -35,6 +37,7 @@ function startTime(){
|
||||
if(original_tz){//Test if there is a non-null value for original_tz. If True then the part of the page this pertains to is being displayed.
|
||||
document.getElementById('time_original').innerHTML = current_time.toLocaleString('en-EN' ,{
|
||||
timeZone: original_tz,
|
||||
dateStyle:'long',
|
||||
hourCycle:'h24',
|
||||
weekday:'short',
|
||||
month:'short',
|
||||
|
||||
Reference in New Issue
Block a user