Where to do conversions - time zones, unit, etc.

Where should conversions be made in the code? client, server, business or db?

We are currently doing time zone and unit conversions in our database, and performance is killing us and wants to move logic. Where, in your opinion, is the best place for this?

thanks

+3
source share
4 answers

I would definitely get this code from the DB. You want to store data in a common set of units whenever you can. There is your time data stored for one specific language (usually your own).

-, , , , , . , , - , .

, , . .

+5

/ . -.

, .

EDIT:

, , /​​/etc . .

+2

We try to do this "as soon as possible" (in our case, these are clients that are connected) and work with the same data on the server. Of course, when sending back data is converted accordingly.

0
source

I'm not sure what you mean by "conversions." If you mean localization, then this is traditionally done in the GUI layer.

0
source

All Articles