Timezone support with date-fns - timezone

I'm considering migrating my project using moment into date-fns which is known as simple, functional etc. But after I played with it a while, I noticed they don't support timezone yet. They have introduced locale and timezone option in format and other functionality in alpha 2.0.0 lately but the locale option is just a language support and the timezone option in those functions just shows/adds the GMT sign(ex. 2018.08.29 GMT+9). So I was wondering if I'm just missing it although they already support it or they really haven't supported it yet.

There is date-fns-timezone which works with date-fns v1, and date-fns-tz for date-fns v2.
See the official timezone documentation from date-fns, that points to date-fns-tz

date-fns timezone support can be found here: https://github.com/prantlf/date-fns-timezone

Related

Z3-str/Z3str2: can it be used in conjunction with the rest of Z3?

We need a string-solver and are considering Z3-str or its successor Z3str2. Can these extensions simultaneously be used in conjunction with all the rest of Z3 (i.e. all other theory solvers implemented in Z3)? Or are these string-extensions only usable quasi standalone?
I don't think so, no. Trying to declare a real using Z3-str gives an error. It seems that only strings and ints are supported.
There are other things to consider before using Z3-str as well. It seems to require a slightly different, non SMT-LIB v2 compliant input format. There are example files provided in Z3-str/tests/. They use, for example declare-variable to declare variables rather than declare-const or declare-fun.
There's also some ambiguity in the project about the difference between Z3-str and Z3-str2. Specifically, if you go to the GitHub page then Z3-str2.py is referenced in the build instructions, but there is no such file in the repo, only Z3-str.py. I think what is on the GitHub page is nonetheless the most recent version, because there are commits from Feb 2016.
Finally, Z3-str apparently uses a deprecated API, so you have to use an old version of Z3. So you might not want to build a new project around Z3-str unless you can deal with using Z3 4.1.1 (October 2012).
You are lucky: Z3 currently natively support strings.
Of course, strings can be combined with all other theories.

Where can I find the current ProvidedTypes.fs API?

The last Type Provider I wrote just after F# 3.0 was released, and I used the ProvidedTypes.fs(i) files that came with the sample pack.
These files are quite old by now, and I wondered if there are more recent versions.
By googling alone I came up with six different versions. Where can I find the current, official version of ProvidedTypes.fs and ProvidedTypes.fsi?
Moreover, I heard that generated types are now easier to implement. Is this funtionality already inside newer versions of those files?
As requested by Nikon, here is the comment promoted to an answer :)
The starter pack is maintained at https://github.com/fsprojects/FSharp.TypeProviders.StarterPack

Where can I find up to date StructureMap documentation?

http://docs.structuremap.net/ seems to have very old examples that use deprecated members.
Is there a place where I can find up to date StructureMap doco ?
I seem to have found some of the newest documentation for version 3.1 at
http://structuremap.github.io/
It looks like it has most of the basic information is there. Some of the other pages don't seem to be fleshed out yet. But it still looks very helpful.
There is no new development. Latest version on NuGet is 2.6.4. So all these examples are the best you can get right now.
We are using it for some years, and because principles are the same, it is (as a concept) still up to date...

OpenOffice.org API or LibreOffice API?

Which API should I use? Which one is more promising? My main goal is to generate ODF documents. It's important for me to support ODF 1.2. And I want to use C++ and CLI bingings.
I use OpenOffice API a lot in an application of me. I made some tests with LibreOffice too and there are some (as far as i see undocumented and unwanted!) differences allready! (OO 3.2 against LO 3.4 and 3.5) Not much but here and there teh LO-Api behaves different from the OO-Api even in the same functionality. This is not important if you only deal with one of them, but it is important when you have to be sure that your App runs with OO and LO.
There is nearly no difference between the two APIs ATM. At least before Libreoffice 4.0 ( which is only in planning with no specific date ) there might be some long necessary API clean-ups. All in all they should be even c++ binary compatible.
Right now you should be able to use the same extensions/code to access both Libreoffice and Openoffice. You should only be careful with all interfaces marked as LibO 3.4 or 3.5 from http://api.libreoffice.org/

JRE clock is different (one hour ahead) than system date

I have a windows server 2003 machine, installed on it, a cisco product called "Cisco Voice Portal", this product runs on JRE version 1_5_0_12.
Getting the date/time either by:
new Date();
or
Calendar.getInstance();
always the date is one hour ahead of the system date.
At first, i thought it is a timezone mismatch, however this is the output of printing the date object:
Fri Oct 08 02:36:38 EST 2010
and the system clock is also in EST timezone. which means that timezones are the same.
The system date is the correct one, the system machine is is Sydney, Australia.
Any suggestions to fix this? Thanks in advance.
First of all, the JRE has it's own database of timezone information and it may or may not differ from the one on your native platform.
Another problem that you might have is that when launching a JRE, you may have specified either a locale or a timezone that is different than that of your host platform, which will also cause this type of behavior.
PS: You might want to read this FAQ entry from Oracle (ex. Sun) on how platform and JVM timezones are (not) related.
Did you try upgrading to newer JRE version? Refer to bug 6595137, which seems to be fixed in 1.5.0_13.

Resources