[sqlite] Sqlite and threads/multiple applications
Hi Olivier, On Sun, Mar 1, 2015 at 5:22 PM, Olivier Vidal wrote: > What would be the most reliable operating system for Sqlite(last version)? As other people have already mentioned, the operating system doesn't matter. Pick the one you're most comfortable or interest in using. The most reliable or secure OS is worthless if you don't care or know how to use it. What I believe is even more important (in terms of reliability) than the OS is the underlying hardware. Namely because no one ever considers hardware. This is true for all databases and even all software. If the hardware says "yeah, I fysnc'ed!", it's not the OS's fault if there was a file corruption due to power failure. These days, a lot of people are using cloud infrastructure where they have absolutely no control and no idea how things work under the hood. -w
Re: [sqlite] Handling Timezones
Hi everyone, Wow, such great responses! So my background is not with this type of development, so I never really thought about these types of problems before. Thank you all for the help! -will ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Handling Timezones
Hi, On Wed, Jul 30, 2014 at 10:01 AM, Keith Medcalf wrote: > Store and retrieve everything in the database in Zulu time. Whether this > means using timestrings, UNIX timestamps, JD or MJD floats is up to you. The > application (user interface) is responsible for converting retrieved data to > the "display timezone" on output and convert data from the "input timezone" > on input. > > This is the only reliable way to handle multiple timezones. There are lots > of moronic ways and five-nines (asctually more like nine-nines) of all > software written use those moronic methods and for that reason do not work > properly ("not work properly" being defined as anything somewhere between > producing incorrect or ludicrously entertaining results and just puking all > over the floor). In many cases "not working" but "not puking" is acceptable > provided that the moronic behaviour is internally consistent. In others, > "not working" is fatal. Well, PostgreSQL's method for this to be handled at the client/connection level seemed to have worked very well, and doesn't seem very "moronic". Having this handled at the database level makes the application(s) much less prone to bugs. Thanks, -will ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Handling Timezones
Hi, On Wed, Jul 30, 2014 at 9:12 AM, Donald Shepherd wrote: > You can represent time zones as integers by using minutes. Examples: +600 > for AEST, +330 for IST, -480 for PST. No string manipulation is needed, > but depending on what or if you're using libraries, you may need extra > steps in there for convert those values into a representation supported by > the library. Ah! I never thought about that. That seems to be the most straightforward for my use. It is too bad it's not possible to set this at a query/connection level :( Thanks! -will ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Handling Timezones
Hi, On Wed, Jul 30, 2014 at 8:38 AM, Simon Slavin wrote: > Store their timezones in the format "[+-]HH:MM" and apply them by appending > that text to any dates they provide. See the "Time Strings" section of I can store each user's timezone setting as "[+-]HH:MM". But I can only apply that to GMT values. So when I'm reading from the database, it's a trivial operation. However, if a user specifies a datetime, I would have to provide the reverse of that value to convert the user time into GMT. It would be a bit easier (yet still messy) if the timezone was just an integer, then I could just "*-1". But the ":MM" seems to make it a messy string operation. Is this the only option? It seems like there would have been a "better" way to handle this. Thanks, -will ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Handling Timezones
Hi, On Wed, Jul 30, 2014 at 8:16 AM, Igor Tandetnik wrote: > 'localtime' and 'utc' modifiers. Ah! I have not explained my issue properly :) I'm very sorry about that. I'm using SQLite as a backend to a small website and I have users in multiple timezones. When users login, their timezone is retrieved from the user table. Really sorry for the confusion. Late night. -will ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Handling Timezones
Hi, On Tue, Jul 29, 2014 at 9:56 PM, Gerry Snyder wrote: > Have you read http://sqlite.org/lang_datefunc.html ? Yes. Is there something there that I missed? I didn't see anything there that relates on how to handle timezone operations. Thanks, -will ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Handling Timezones
Hi, How are timezones best handled? Since dates are stored in GMT, when I go to display them, I need to add/subtract the timezone. That's not too hard when I can just store the timezone as "-5" for EST. When I'm providing a date to query on, I would have to apply the reverse of the timezone, "+5", to normalize it to GMT. That kinda sucks :( I come from PostgreSQL, so I normally set at the connection level the timezone and PG handles all the conversions. Does SQLite have a similar feature? Is there a standard way to handle this? Thanks, -will ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users