dsl-compiler-client icon indicating copy to clipboard operation
dsl-compiler-client copied to clipboard

how to use timestamp without timezone

Open araneta opened this issue 1 year ago • 1 comments
trafficstars

how to use timestamp without timezone ? is that possible

root Requirement{
		string name;
		bool isActive;
		ScholarshipType *ScholarshipType;
		bool forSurvey;
		int inputType; //1: file, 2:text
		bool mandatory;
timestamp? createdAt;
timestamp? updatedAt;
timestamp? deletedAt;
	}

araneta avatar Sep 06 '24 23:09 araneta

Timestamp without TZ is almost always the wrong type to use in PG. PG doesn't even save the TZ as it was specified, but it rather converts it to instance configured one.

If for some reason you really need TS without TZ you can use two fields: Date and Time

zapov avatar Sep 09 '24 08:09 zapov

i see, thank you so much for your explanation

araneta avatar Oct 23 '24 22:10 araneta