[CONJS-237] Timezone option improvement Created: 2023-01-16 Updated: 2023-02-02 Resolved: 2023-02-02 |
|
| Status: | Closed |
| Project: | MariaDB Connector/node.js |
| Component/s: | configuration |
| Affects Version/s: | None |
| Fix Version/s: | 3.1.0 |
| Type: | Task | Priority: | Major |
| Reporter: | Diego Dupin | Assignee: | Diego Dupin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Problem concerns client and server having different timezone. Actual implementation is using option `timezone`, that can have different type of values:
Problem is that connector does conversion, creating problems with datatype DATE and TIME , and conversion didn't comply well with time function.. ProposalThe only real good solution is to have session using client timezone. Timezone option won't change, but in place of conversion, connector will set session timezone :
the best default would be 'auto' value, in order to have a correct solution by default, even if not the more efficient, but that would be a breaking change only allowed in a futur 4.x version. The only issue is that server need having TZ data filled in case client timezone differ from server. In this case, connection will fail on creation. |