feat: timezone support and setting

This commit is contained in:
Per Stark
2025-01-27 14:44:37 +01:00
parent 9a3a8f3a1e
commit d04f3faba5
9 changed files with 130 additions and 9 deletions
+6
View File
@@ -43,6 +43,7 @@
Create Account
</button>
</div>
<input type="hidden" name="timezone" id="timezone" />
</form>
<div class="divider">OR</div>
@@ -52,4 +53,9 @@
<a href="/signin" hx-boost="true" class="link link-primary">Sign in</a>
</div>
</div>
<script>
// Detect timezone and set hidden input
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
document.getElementById("timezone").value = timezone;
</script>
{% endblock %}