Archive for 'java'

Sun Certifierad Java Programmerare (SCJP)

Det har inte blivit något skrivet här på sistone eftersom jag pluggat frenetiskt de senaste veckor för att certifiera mig inom programmeringsspråket Java. Idag skrev jag provet hos Cornerstone i Sundsvall och klarade det. Jag fick 68% rätt på de 72 frågorna, där gränsen var 59%. Yippie, fy fan vad jag fick slita…

Nu är jag alltså certifierad java utvecklare enligt Sun. Nästa mål är att certifiera mig som Microsoft Certified Technology Specialist (MCTS) i .NET Framework 2.0.

Detta ska firas i helgen!

champagnebottle

Unix timestamp in C#, Java and php

For some strange reason the Dotnet framework has no conversion between a unix timestamp and a DateTime. Or has it? Why is it so when the framework has billions of other stuff that you never use. This functionality is actually something you would normally use in a system that communicates with the outside world.

This webpage has a solution
Another page about the same stuff

In my current project I am trying to convert a Java Calendar object to a C# DateTime through JNI (Java Native Interface). I have no perfect solution at this moment but I will try to use a unix timestamp though I am losing some precision.

Java has direct conversion from Calendar to Date (which is a representation of a unix timestamp). Bravo! :-)

php has lots of functions (like timetostr, time) to create and convert unix timestamps.