From b10810b1205368fa86a3c69558b8c6803cb54ea6 Mon Sep 17 00:00:00 2001 From: 20xd6 <20xd6@airmail.cc> Date: Sun, 6 Sep 2020 11:35:47 -0400 Subject: [PATCH 1/4] Remove the README.md from prod branch This should be present on master but is unessary for deployment. --- README.md | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 README.md diff --git a/README.md b/README.md deleted file mode 100644 index f1bfaa6..0000000 --- a/README.md +++ /dev/null @@ -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 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/scm/git/WebClock` -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). \ No newline at end of file From de2e79491cb154209aa3b68ae5b357fa8ebeabc5 Mon Sep 17 00:00:00 2001 From: 20xd6 <20xd6@airmail.cc> Date: Sun, 27 Sep 2020 16:40:06 -0400 Subject: [PATCH 2/4] Rebasing from master. I had started work on a new feature on the production branch. Master having been protected. --- clock.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/clock.php b/clock.php index f1552b4..6ae0eb7 100644 --- a/clock.php +++ b/clock.php @@ -109,14 +109,13 @@
-

-

Timer

- Timer + From 732a0632295a5e7e2cb0ad1ff65e35c3717c912e Mon Sep 17 00:00:00 2001 From: 20xd6 <20xd6@airmail.cc> Date: Sun, 9 May 2021 12:28:02 -0400 Subject: [PATCH 3/4] Add Copy Timestamp A button that will copy the current timestamp has been added. --- clock.js | 11 +++++++++++ clock.php | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/clock.js b/clock.js index 875acf5..b58802c 100644 --- a/clock.js +++ b/clock.js @@ -46,3 +46,14 @@ function startTime(){ } //document.getElementById('JStz').innerHTML = current_tz; } + +function copy_timestamp() { + var copyText = document.getElementById("time_body").innerText; + var temp_element = document.createElement("textarea"); + document.body.appendChild(temp_element) + temp_element.value = copyText; + temp_element.select(); + temp_element.setSelectionRange(0,999); + document.execCommand("copy"); + document.body.removeChild(temp_element); +} diff --git a/clock.php b/clock.php index 6ae0eb7..2420058 100644 --- a/clock.php +++ b/clock.php @@ -45,7 +45,7 @@ "
". "

". date("D, M d, Y, H:i:s") . - "

GMT". date("O T") ."

\n\t\t
"; + "

GMT". date("O T") ."

\n\t\t"; if($_POST['originalTZ']){// if the user want display the browser detected timezone as well as the selected one. date_default_timezone_set($originalTZ); echo'

Time in original Timezone

'. From 163b2fdb3a88082c4b275e8bfd2570fbe182a636 Mon Sep 17 00:00:00 2001 From: 20xd6 <20xd6@airmail.cc> Date: Sun, 9 May 2021 12:32:14 -0400 Subject: [PATCH 4/4] Add readme to prod --- README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..af7880a --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +# 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). \ No newline at end of file