Mismatch in the local time when using the RWTime.

Hi All,
RWTime is showing +1 Hr excess for the local time.
Compared the time with the ouput of unix date command as well.
$ cat time.cc
#include <iostream>
#include <ctime>
// Roguewave headers
#include <rw/rwtime.h>
#include <rw/rwdate.h>
#include <rw/zone.h>
int main()
   // current date/time based on current system
   time_t now = time(0);
   // convert now to string form
   char* dt = ctime(&now);
   std::cout << "\nThe local date and time is: " << dt << std::endl;
   // convert now to tm struct for UTC
   tm *gmtm = gmtime(&now);
   dt = asctime(gmtm);
   std::cout << "The UTC date and time is:"<< dt << std::endl;
   std::cout << "-----------------------------------------------" << std::endl;
   // Roguewave counterparts
   RWTime t;
   std::cout << "\n[RW] The local date and time is: " <<
                t.asString() << std::endl;
   std::cout << "\n[RW] The UTC date and time is : " <<
                t.asString((char)NULL, RWZone::utc()) << std::endl;
   std::cout << std::endl;
   return 0;
$ CC -m32 -g -library=rwtools7_std -o test time.cc
$ ./test ; date
The local date and time is: Fri Jul  1 14:55:18 2011
The UTC date and time is:Fri Jul  1 09:25:18 2011
[RW] The local date and time is: 07/01/11 15:55:18
[RW] The UTC date and time is : 07/01/11 09:25:18
Fri Jul  1 14:55:18 IST 2011
$The header rwdate.h has following definition for default constructor.
RWTime() : sec(RWTime::currentTime()) {;}     // current timeSeems like a bug in RWTIme::currentTime() functionality.
Could someone conform the same (or) am i using RWTime wrongly ?
Thanks & Regards,
Sreekar

I tried your code using the same compiler on OEL 5.4, which is based on RHEL 5.4. I got correct answers for my time zone -- US-Pacific with Daylight Savings Time.
What time zone are you in (GMT+1 or GMT+2), and is DST supposed to be in effect?
The likely sources of the problem are that your machine does not set DST correctly, or that you are in an area for which RW Tools.h++ cannot provide a correct answer. (There are some places where the local rules can't be expressed in the limited representations of time zones and DST in Tools.h++)
What is the value of environment variable TZ?
Edited by: Steve_Clamage on Jul 5, 2011 9:31 AM

Similar Messages

  • Several of us have a iPhone 6s and are having trouble with hearing and speaking at the same time when using the phone. ? The speakers seem to be too far apart? Are others having this issue? Solutions?

    Several of us have a iPhone 6plus and are having trouble with hearing and speaking at the same time when using the phone. ? The speakers seem to be too far apart? Are others having this issue? Solutions?

    Not having the problem, don't personally know anyone who is.

  • I can't seem to use the 'Check seats' link on Delta when I use Firefox but Safari works fine. I get the message 'not available at this time' when using Firefox but when I go to Safari it works fine.

    I can't seem to use the 'Check seats' link on the Delta Airlines site when I use Firefox but Safari works fine. I get the message 'not available at this time' when using Firefox but when I go to Safari it works fine. I love Firefox but this sucks!

    That issue can be caused by corrupted cookies.
    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    *Firefox > Preferences > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Firefox > Preferences > Privacy > Cookies: "Show Cookies"
    *http://kb.mozillazine.org/Cookies

  • Why is the response time when using clickwheel...

    I've bought a new 60gb video and, in comparison to my 20gb 3rd generation, the response time when using the clickwheel (next track/pause/play/bak track) is annoyingly long on start-up. And the display takes seconds to catch up with what's playing sometimes freezing with half of the one 'page' showing and half of another. Should I expect this because of the larger capacity/more complex iPod?
    Also, in an earlier post I noted that when the iPod first fires up, tracks seem to stop and start - just for a second or so, 3 or 4 times within the first 15 seconds. It's not the track on iTunes as it never happens on my 3g.
    Dell   Windows XP  

    Definately sounds like a faulty harddrive.
    You could always try restoring it with the most recent updater, and reloading everything - kind of like a fragmented harddrive, I am noticing better performance since I last wiped it clean and relaoded it (due to another error - actually)....

  • Photobooth crashes every single time when using Motu Hybrid MK3 audio interface?

    Photobooth crashes every single time when using Motu Hybrid MK3 audio interface.
    It is happening on my late 2013 IMAC, and also on my old 2011 Macbook pro.

    Same thing here with Mavericks and M-Audio Fast Track Ultra.  Very easy to reproduce, Apple. Set your audio interface for the external device, try to record Photo Booth video. It will crash. Every. Single. Time. Always.

  • Slow downloading times when using the cloud

    Has anybody else noticed slow loading times when transfering files via the cloud? We have tested speeds across three of our magazines each on different networks. Some are faster than others but overall the speeds are still slower than we would hope.
    I did have a problem with Adobe servers many months ago when we were still using V11 and the rest of the world was on V17 but the engineering team at Adobe quickly fixed this for us. I am just wondering how everybody else is getting on time wise when downoaoding folios, it may be we have a problem with our network than needs addressing internally.
    Thanks
    Liam

    Katy ..
    I try to click a link I get a redirect loop message.  Also on some websites such as bbc.co.uk or hotmail will not load and I get the message
    Try troubleshooting malware >  The Safe Mac » Mac Malware Guide
    iCloud isn't the issue.

  • Unable to insert date and time when using date datatype

    Hi
    I am hitting a bit of a problem when using the date datatype. When trying to save a row to the table where the field it throws an error ora 01830 and complains about converting the date format picture ends...etc. Now when I do the insert, I use the to_date function with the format of "dd-mon-yyyy hh24:mi:ss". Of course, when I remove the time element, everything is perfect.
    Checking sysdate, I noticed that the time element wasn't be displayed, and I used alter session set nls_date_format to set the date and time I want to save to the table, which worked!
    Then based on advice in a previous thread to permanently fix the problem, I used alter system set nls_date_format ="dd-mon-yyyy hh24:mi:ss" scope=spfile; This showed that it was altered, and I can see the setting in the em. In sqlplus, I shutdown the database, and restarted with startup mount; alter database open; and then selecting sysdate, it still shows the date as dd-mon-yy, and still no time! Checking the em, and looking up the nls_date_format the setting is still shown as "dd-mon-yyyy hh24:mi:ss".
    So, my question is this - what am I doing wrong? Why can't save date and time using date in Oracle 11g?????
    Thanks

    user633278 wrote:
    Hi
    I am hitting a bit of a problem when using the date datatype. When trying to save a row to the table where the field it throws an error ora 01830 and complains about converting the date format picture ends...etc. Now when I do the insert, I use the to_date function with the format of "dd-mon-yyyy hh24:mi:ss". Of course, when I remove the time element, everything is perfect.
    Checking sysdate, I noticed that the time element wasn't be displayed, and I used alter session set nls_date_format to set the date and time I want to save to the table, which worked!
    Then based on advice in a previous thread to permanently fix the problem, I used alter system set nls_date_format ="dd-mon-yyyy hh24:mi:ss" scope=spfile; This showed that it was altered, and I can see the setting in the em. In sqlplus, I shutdown the database, and restarted with startup mount; alter database open; and then selecting sysdate, it still shows the date as dd-mon-yy, and still no time! Checking the em, and looking up the nls_date_format the setting is still shown as "dd-mon-yyyy hh24:mi:ss".
    So, my question is this - what am I doing wrong? Why can't save date and time using date in Oracle 11g?????
    ThanksYou most certainly can save the time. A DATE column, by definition stores date and time. What you describe is a presentation problem, and setting nls_date_format at the system as an init parm is the weakest of all settings as it is overridden by several other locations.
    without seeing the exact sql that produced the error (not just your description of what you think you were doing) it is impossible to say for sure.
    However, I'd suggest you read http://edstevensdba.wordpress.com/2011/04/07/nls_date_format/

  • Why is there a problem with Itunes freezing up at least 1-2 times when using it?

    It is kind of getting old but my Itunes player (does not matter which one as I update to the latest version) has this nasty habit of freezing whether I am trying to listen to the radio or my own library.
    It is now happening almost every time I use Itunes and when it freezes the only fix is to do the old Control-Alt-Delete.
    I am running a 64 bit Window's 7 home premium and prefer using Itunes but you know if you does not work get something else
    I have 4 GBs Ram with a 2.6 Dual Core Pentium
    More frustrating is the lack of support from Apple. Oh wait Itunes is for free so you do not get help.
    Even better is a troubleshooting aid that when you click NO it did not help then the window itself just disappears
    Yes I checked and it is a system problem but it is a problem that has existed since Itunes put out their 10 series.
    Given the number of times this question is being asked by others then is it too much to think that Apple realizes that they have a problem application and it is not the fault of the user or Microsoft OS.
    No offense Apple but I know if 10% have a problem that it does not matter to you but why should I spend money on any of your products if you can not come out with a fix for your own medial player?

    Do not use Clear Recent History to clear the "Site Preferences"
    * https://support.mozilla.com/kb/Clear+Recent+History
    Clearing "Site Preferences" clears all exceptions for cookies, images, pop-up windows, software installation, and passwords.

  • "Type mismatch" error in IE7/8 when using custom Actions Menu Image

    Hi all,
    in APEX 4.2: when using a custom image in the "Actions Menu Image" attribute in an interactive report, I get a "Type mismatch" error in IE7/8 when refreshing the report through PPR (filtering, sorting, paginating etc.). When I leave the "Actions Menu Image" field empty, everything works fine. The error doesn't seem to happen in IE9 (unless using compatibility mode), or in any non-IE browser.
    I've been able to reproduce the issue in an application on apex.oracle.com:
    http://apex.oracle.com/pls/apex/f?p=69347:1
    Some debugging seems to indicate that the following line in widget.interactiveReport.js is the culprit:
    lTemp.parentNode.replaceChild($x('apexir_WORKSHEET'), lTemp);Does anybody know if this is a known issue, or if there is some workaround?
    Thanks,
    Tobias

    Hi,
    Great solution Paul! It cost me a while before I found out the Action Menu Image was causing my interactive reports to stop refreshing in IE10 and not other browsers. Your solution works great, I've implemented it with a few minor adjustments:
    - Put the css in report template (for some reason it didn't work in our own application stylesheet)
    - replace  'url("/c/action_dropdown.gif")' with 'url("&APP_IMAGE_PREFIX./<path_to_image>")'
    - place one dynamic action on page 0: after refresh of '#apexir_DATA_PANEL' , set event scope to "Dynamic".
    - Let the Dynamic action also fire on page load.
    - To make sure the dynamic action only works for pages with an interactive report add condition of type 'Exists' with expression:
    select 1
    from   dual
    where  :APP_PAGE_ID in (select page_id
                                            from   apex_application_page_ir
                                            where  application_id = :APP_ID
    Best regards,
    Vincent Deelen

  • Cube Solve Time when using MAX Aggregation Operator

    Hello,
    We have created a cube to implement the count distinct measure we need.
    The cube contains only one measure (COUNT) and uses the MAX operator to aggregate across all other dimensions except for the one we want to count (which uses the SUM operator). We have set the precompute percent to 60% for the bottom partition and 0% for the top partition. The cube is compressed.
    The problem is that the SOLVE step for a partition when performing a COMPLETE cube build, seems to be taking a very long time and is taking up huge amounts of TEMPORARY tablespace.
    We have succesfully created another cube with the same dataset which uses the SUM operator across all dimensions.
    This cube build was completed in a reasonable amount of time even though we had 5 stored measures and 80% aggregation for the top partition.
    Is this behaviour expected when using MAX operator?
    Thank you,
    Vicky

    Thank you, David.
    As you said we are using mixed operators because we are doing a distinct count.
    We will try setting the precompute percent to 35%,although I'm a bit worried about the query performance in this case.
    Neelesh, I think that Atomic Refresh was set to TRUE during the last refresh but the cube was the only object in the build script.
    No other cubes or dimensions were maintained in the same build so I don't think it could have affected the use of TEMP tablespace.
    Generally we don't use Atomic Refresh.
    Thank you,
    Vicky

  • Fan is on all the time when using vmware

    My fan is on constantly on my MacBook Pro when I am running VMware Fusion 4 and a virtual Windows 7 instance.  Why do you suppose this is happening?

    mnatale1 wrote:
    My fan is on constantly on my MacBook Pro when I am running VMware Fusion 4 and a virtual Windows 7 instance.  Why do you suppose this is happening?
    Lion and VMFusion 4 is to blame, but mostly VMFusion 4, I've heard it's a bit on the heavy side.
    However you might have allocated too many processors or RAM to the virtual machine, power down and set Windows to one processor and 1GB of RAM and see how it goes.
    I went through the same thing for some time.
    Also try to keep a eye out for Firefox and Chrome, they and their add-ons are not good stewards of your memory which can cause issues with your VM software.
    Look in your Activiity monitor and keep your RAM use under control.
    You can also ask around the VM Fusion forums and see what they say.

  • Is there anyway to increase the connection time when using Remote Connections in Photoshop CC

    I am using the Adobe Tutorial Player and have a connection estiblished between my iPad and Photoshop CC.  The connect drops frequently.  Is there a way to incerase the connection time lenght.  It would be helpful in working through the tutorial to not loose the connection.  I am using Photoshop CC, Windows 8.1 and iOS 7.0.4
    Thanks

    See this post Smart view first refresh
    Aside from turning auto-calculation off, you would need to copy the cells and paste them as values to get a static worksheet. This will eliminate any future refreshes.

  • Mac Mail randomly deleting more than one email at a time when using the garbage can icon

    I have been using Macs since the 2e, so I know about things like "rules" and such. However I just went from 10.6 to 10.8.2 and now have this wierd glitch, beyond the random dropping of my wifi connection. That is an iritation, the muti-deleting of mails in my inbox is much worse.
    Basically I click on the highlighted Email to trash it, and the next one in line goes too. This is a random occurance (about once every 4 or 5 deletes) but realy needs to stop. Does anyone see this, besides me?
    Took the combigned 10.6.8 to 10.8.2 update (digital of course).
    27" iMac i5
    2.66 GHz Intel Core i5

    I have the same problem, did you get a resaloution?

  • Blinking Hourglass all the time when using my Blackberry!

    Hey Guys I've searched all over and nobody seems to be able to solve this one.
    My Blackberry 8130 has all of a sudden startred shoing a constantly blinking Hourglass.  I can use my Blackberry but it seems to be a bit bogged down buy the constant blinking of the hour glass (IM pretty sure it's not getting my email either yet all other online functions work.  Here's what I HAVE done...
    - I have shut down all apps running in the background except the five that always run
    -  I have removed the battery waited for awhile and put the battery back in.
    - I have over 17 megs of free memory
    I've removed any third party Apps and it still blinks away.... VERY annoying.
    Any ideas on how to fix this guys?
    -Gregg

    I was looking up this same problem...because I had it on my 2nd blackberry that I got within a one month period. I found that if you delete the facebook application (because if you have facebook you know that it changed over to a new setting, causing issues) and then restart your phone..take out battery...then it should work. I did that and next thing I knew the 18 emails I missed appeared. I haven't reloaded the facebook application yet, but I was told that you can and it should work fine.
     Hope this helps!  

  • A blue screen appears and gets restarted each time when using the iphone ...wat shd i do to solve this ??

    i bought a new iphone 4s 64 gb from a nearby store in ma hometown ...my iPhone flashed a blue screen then rebooted more than  twice in the same day, I then updated to 6.13 (lastest IOS version )...still the problem continues..... wat should i do to solve this ?

    I would bring the phone back.

Maybe you are looking for