Skip to content
Snippets Groups Projects
Commit 8cd4a84a authored by Recolic's avatar Recolic :house_with_garden:
Browse files

.dummy adjustment, timezone fix

parent 16002b8e
No related branches found
No related tags found
No related merge requests found
......@@ -179,7 +179,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// Handle render page request
$results = renderPage();
foreach ($results as $date) {
echo "Budget used on: $date\n";
echo "X:$date\n";
}
} else {
echo "Invalid request method\n";
......
......@@ -53,7 +53,13 @@
<script src="calendarorganizer.js"></script>
<script>
const date_today = new Date().toISOString().split('T')[0]; // YYYY-mm-dd
function getLocalDateString() {
// Returns YYYY-mm-dd
// Simply `new Date().toISOString().split('T')[0]` doesn't work, because toISOString is in UTC.
const d = new Date();
return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')}`;
}
const date_today = getLocalDateString();
// document.getElementById('submit-form').addEventListener('submit',
function submitNewCostForm() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment