I created a small program to select the date using bootstrap-datepicker and write it to MySQL.
The catch is that this date must be local to Europe/Berlin
regardless where the user is at the moment.
$(....).datepicker({ startDate: 'today' });
My question is: how do I set startDate
to be local to specific timezone without using server side code (PHP) or any other libraries?
I tried using moment
+ moment-timezone
but it's also showing the local browser date.
var todaysDate = moment().tz('Europe/Berlin').format();
$(...).datepicker({ startDate: todaysDate });
Thanks.