Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

address review: fix birth date timezone edge case in validation

Adam Eivy4164bbd4670a
diff --git a/package-lock.json b/package-lock.json
index a070af2e32..28cd9d9e09 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "portos",
- "version": "1.8.5",
+ "version": "1.8.6",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "portos",
- "version": "1.8.5",
+ "version": "1.8.6",
"license": "MIT",
"dependencies": {
"express": "^4.21.2",
diff --git a/package.json b/package.json
index b0ec043356..a1c64360e7 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "portos",
- "version": "1.8.5",
+ "version": "1.8.6",
"private": true,
"description": "Local dev machine App OS portal",
"author": "Adam Eivy (@antic|@atomantic)",
diff --git a/server/lib/identityValidation.js b/server/lib/identityValidation.js
index 169edc251b..c4324827e4 100644
--- a/server/lib/identityValidation.js
+++ b/server/lib/identityValidation.js
@@ -27,7 +27,11 @@ const validCalendarDate = z.string()
export const birthDateInputSchema = z.object({
birthDate: validCalendarDate.refine(
- (value) => new Date(value) <= new Date(),
+ (value) => {
+ const today = new Date();
+ today.setUTCHours(23, 59, 59, 999);
+ return new Date(value) <= today;
+ },
'Birth date cannot be in the future'
)
});