Date shifting 1 day back on 1 of many systems :S

This piece of java software I am responsible for is running throughout numerous locations in my country, there is only 1 location which has trouble with the dates being displayed incorrectly, birthdates of clients are displayed as a day earlier. It seems pretty safe to say it is a problem on their end... But still, they're asking me for an explanation as to why java would treat a date differently in this rare case.
The date (a birthdate) comes from an oracle database, it is a date without a time (trunced date). It enters the application as a member of the client-class, it is NOT being set or changed after that. It goes through several layers in the application, then ends up in a GUI class which unwraps it from the "client"-object and puts a SimpleDateFormat (new SimpleDateFormat("dd-MM-yyyy")) on it.
My first and only hunch was the timezone settings, but that seems to be OK!
Does anyone here have any clue as to what might cause this strange behaviour?

I have in fact tried changing the timezone from +1:00 to 0:00, and it is the only way I can reproduce this problem on my local machine here. I figured since java dates always has a time (since java data is based on milliseconds from epoch), the trunced sql date will end up being at midnight, the first millisecond of that date sorta speak. When the timezone differs -1, it will become 23:00 (11PM) the previous day, so the date ends up displayed as the day before.
So, yes, timezone difference can cause this same problem.
However, the people I am dealing with here ensure me their timezones are set correctly :S
Not sure how credible this response is though...

Similar Messages

  • 30 days back data from selected date

    Hi Gurus,
    I have date prompt in a format (02/01/1998(MM/DD/YYYY)12:00:00 AM) and I have report with 4 columns in the 1st column date 2ed column sales 3ed column 30 days back date 4th column 30 days back sales.
    Date | Sales | 30 days Back date(from the selected) | 30 days back Sales
    How i have to take the days from the above format and make that to 30 days back can any one suggest me how to implement this.
    Thanks,
    Rafi

    Hi Svee ,
    I added timestampadd(SQL_TSI_DAY, -30,Date) formula in the Fx of 30 days back column and it is showing 30 days back date but it is not showing 30 days back Sales it is showing same sales for both date columns.
    Thanks,
    Rafi
    Edited by: Rafi.B on Aug 20, 2012 11:48 AM

  • 30 Business Days Back

    Hi All,
    I need to find the calendar date 30 business days back from SYSDATE:
    Formula: Calendar Date = SYSDATE - "30 business days"
    I have a table contains:
    cal_dt,bus_day,holiday
    7/1/10,1,NULL
    7/2/10,1,NULL
    7/3/10,0,NULL
    7/4/10,0,NULL
    7/5/10,0,'Y'
    7/6/10,1,NULL
    For the life of me, I can't figure it out how to write the SQL? Please help.
    Using Oracle 10g.
    Thanks,
    Mary

    The first query gives you: Today's date - 30 'BUSINESS' days
    select cal_dt
    from
    select cal_dt, bus_day, holiday,
    row_number() over (order by cal_dt desc) rn
    from calendar
    where cal_dt <= TRUNC(SYSDATE)
    and bus_day = 1
    and holiday is NULL
    where rn = 31;
    The second query gives you: Last 'BUSINESS' day preceding (Today's date - 30 'CALENDER' days)
    Select cal_dt
    from (
    select cal_dt, bus_day, holiday,
    row_number() over (order by cal_dt desc) rn
    from calendar
    where cal_dt <= TRUNC(SYSDATE-30)
    and bus_day = 1
    and holiday is NULL
    where rn = 1;
    Or, you may try a simple alternative to my first query:
    select cal_dt
    from
    select cal_dt, ROWNUM rn
    from
    select cal_dt, bus_day, holiday
    from calendar
    where cal_dt <= TRUNC(SYSDATE)
    and bus_day = 1
    and holiday is NULL
    order by cal_dt
    where rn = 31;
    You may try to run these queries step by step to check what is happening and what suits to your needs.

  • Significance of 'Days Back' field in SQL datasource

    Hi,
    I have a 'days back' as one of the field in the view from where i'm extracting data to an ODS. I have it set for selection. I don't have any IO associated to it in the ODS. What is the significance of this field?
    I have run a full load around a month back. I want to do a delta load. I guess if I don't put any values in the 'days back' field in the infopackage, it won't make any difference and the delta load will load properly. If i put values like 0-5, would it only transfer data upto 5 days back?
    Please let me know if there is any documentation on this.
    Regards
    Sameer

    If this is a custom extractor then you are, of course, on your own ...

  • I bought new i phone 5 3 days back, after that asked for new update which is 6.1.4, after updating my iphone i am not able to use cellular data services. I called up data provider, they says its the problem with new software update. There is no option add

    I bought new i phone 5 3 days back, after that asked for new update which is 6.1.4, after updating my iphone i am not able to use cellular data services. I called up data provider, they says its the problem with new software update. There is no option add APN. Now when i switch to safari its showing you are not subscribed for cellular data. But I am able to use data on other phone.
    Will you please help me in this regard?
    Another issue, since i bought my new iphone there is dust inside back main camera.
    Your advises are highly appreciated.

    Hey Shaiju isac,
    I'd take a look at the following article, it'll guide you though steps to you troubleshoot cellular data issues on your iPhone:
    iPhone: Troubleshooting a cellular data connection
    http://support.apple.com/kb/ts3780
    Cheers,
    David

  • I have updated my mac from snow leopard to mountain lion 3 days back. I had some important data in my library folder and it got overwritten. Is there any way i can get the data back from my snow leopard library folder?

    I have updated my mac from snow leopard to mountain lion 3 days back. I had some important data in my library folder and it got overwritten. Is there any way i can get the data back from my snow leopard library folder?
    I tried mackeeper to recover files but it could not. Any other way any one has tried to recover a system library folder after OS upgrade?

    No, it doesn't store a clone. You would have needed to make one with either SuperDuper or CarbonCopy Cloner.
    If the files were in your ~/Library folder then they may still be there. As I said, you can access it by
    going to your Finder "Go" menu hold the option key to choose "Library". I wouldn't think an upgrade would overwrite anything in ~/Library.
    If you have a Time Machine backup you may also be able to use that to retrieve them.

  • How to get one day back data from selecting date .

    Hi Experts,
                   Iam using DB2 database .How to see one day back of selected date . i tried by using prompts .
    Date=(@prompt('Mssg','D',,mono,free)-1 days)   Date is a date object and i applied prompt for date . butting i'm facing error . so kindly help me to over come this issue .
    Regards
    Dinesh

    first capture Date on univers by simply using your formula
    Date=(@prompt('Mssg','D',,mono,free))
    Now to get the previous date i.e 1 day back date
    create another variable called
    back_Date = (Date - 1 Day)
    Thanks,
    Swapnil

  • I want to Subtract the current date to find out whats the date 10 days back

    Hi guys,
    I want to subtract the current date to find the date 10 days back. If I use Gregorian calendar and then substract the day
    calender.get(GregorianCalendar.DATE) - 10;
    I will get right if my current date is 20 or more. If it happens to be less than 10, then I get in negative.
    Please suggest an solution for this.
    Thanks in advance
    With regards,
    Amin

    Here's the code.
        GreogrianCalendar mycalendar = new GregorianCalendar() ;
        mycalendar.add(mycalendar.DATE, -10) ;That should get you the date you want and just ignore the background noise that is hambone.
    Hi guys,
    I want to subtract the current date to find the date
    10 days back. If I use Gregorian calendar and then
    substract the day
    calender.get(GregorianCalendar.DATE) - 10;
    I will get right if my current date is 20 or more. If
    it happens to be less than 10, then I get in negative.
    Please suggest an solution for this.
    Thanks in advance
    With regards,
    Amin

  • Dates shifting by a day in shared calendar

    Hello there,
    I have a shared calendar with my band where I'm the administrator. For some reason, everytime one of my friends input an event it shows in my calendar in the wrong date, more precisely it shift one day forward and displays always that the event is set at 1am.
    So for exampe, if my friend input that our gig is on saturday April 27th at 10pm it shows in my calendar on sunday 28th at 1am... and this happens with all the events.
    We all have iPhones and Mac computers so we thought this was a good option for us to keep a schedule visible for all. We'd really like this to work.
    Please help
    Thank you.
    M

    Hi,
    Read this:
    http://www.macobserver.com/tmo/article/Understanding_iCal_Time_Zones
    John M

  • All my appointments shifted one day backwards when sync'd

    When sync'ing my new iPhone 4S to my iMac, all the dates (e.g. appointments, birthdays, etc) shifted one day backwards.  For example, a Birthday entered in my Address Book, that populated into my iCal, on my iMac for December 10th showed up in my iPhone Calendar for December 9th after sync'ing.
    Any thoughts?

    So... although I have not found a solution, I have experimented, identified the limits of the issue and found a work around.
    Summary of Issue: Dates entered in either iCal or Address Book on iMac shift one day backwards when sync'd to iPhone.  Only in the iPhone Calendar; they do not shift in the iPhone Contacts.
    This issue does not occure in reverse, dates entered in the iPhone (vie either Contacts or Calendar) then sync'd to the iMac appear correct in both the Address Book and iCal on the iMac.
    Also, dates entered in Contacts on the iPhone appear correct in the iPhone's Calendar.
    Limit of issue... only dates pulled from the iMac to the iPhone shift one day and only in the iPhone's Calendar.
    Work Around - After sync'ing dates 'from' the iMac 'to' the iPhone:
    If the date was entered in iCal on the iMac simply go into the iPhone's Calendar and edit the event, revising it to the correct day.  No re-sync'ing necessary, but if you do nothing will change.
    If the date was entered in Address Book on the iMac, the edit function does not exist in the Calendar on the iPhone (because it is not a Calendar-based event, it is a Contact-based event.)  You'll have to revise it in the iPhone's Contacts.  But, remember, it sync's over correctly there.  And in-order for the iPhone's Calendar to adjust it has to sense a revision...
    You'll have to go into the iPhone's Contacts, revise the date to an incorrect date, save the change, then change it back to the correct date and save the change.  Then leave Contacts, enter Calendar and it will update.  Again, no re-sync'ing necessary, but if you do nothing will change.
    Not a solution, but a work-around.  If anyone has a solution, I would still be interested in it.

  • How to find an SSRS report subscription was executed 3 days back and sent an Email to the requested person or group?

    Hi All,
    I got complain that one of my reports which was subscribed from SSRS Report Manager could not delivered to targeted people 3 days back. 
    I want to to check that Email was sent or not So I wrote below query but I think table  will be over written on each execution of subscription and cannot see the history. I can see only the latest data.
    SELECT A.NAME,B.Description,B.LastStatus,B.LastRunTime 
    FROM [dbo].[Catalog] A
    INNER JOIN [dbo].[Subscriptions] B ON A.ItemID=B.Report_OID
    WHERE TYPE=2 
    AND NAME='REPORT_NAME'
    AND B.LastStatus LIKE '%EMAIL ID%'
    AND B.LastRunTime>Getdate()-1
    ORDER BY B.LastRunTime
    There is another query which says that report was rendered by SUBSCRIPTION and have no track that Email was sent or not.
    --Query to find out how a report was execute 
    SELECT * FROM EXECUTIONLOG3 
    WHERE REQUESTTYPE='SUBSCRIPTION'
    AND ITEMPATH LIKE '%REPORT NAME'
    ORDER BY TIMESTART DESC
    There is any way to track this?
    https://msdn.microsoft.com/en-us/library/ms159110.aspx
    http://blogs.msdn.com/b/deanka/archive/2009/01/13/diagnosing-and-troubleshooting-subscriptions.aspx
    Thanks Shiven:) If Answer is Helpful, Please Vote

    Hi S Kumar Dubey,
    According to your description, you want to find the failed subscription report and resent the report to users again.
    In this scenario, you can run the query below to find the failed subscription.
    use ReportServer
    go
    SELECT C.Name, S.LastRunTime, S.LastStatus, S.Description
    FROM Subscriptions AS S
    LEFT OUTER JOIN [Catalog] AS C
    ON C.ItemID = S.Report_OID
    WHERE LEFT (S.LastStatus, 12) != 'Mail sent to'
    AND LEFT (S.LastStatus, 12) != 'New Subscrip'
    Then you can execute the code with jobstep command below to find the corresponding SQL Agent Jobs for failed subscription, then execute the job to send the email again.
    select 'exec sp_start_job @job_name = ''' + cast(j.name as varchar(40)) + ''''
    from msdb.dbo.sysjobs j
    join msdb.dbo.sysjobsteps js on js.job_id = j.job_id
    join [ReportServer].[dbo].[Subscriptions] s on js.command like '%' + cast(s.subscriptionid as varchar(40)) + '%'
    where s.LastStatus like 'Failure sending mail%';
    Reference:
    SSRS Failed Subscription Notifications
    Re-running SSRS subscription jobs that have failed
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • Date Shifted Events in Calendar

    In the Month View and the Day View of Celandar under iOS 5 all of the entries appear correct. However, in the List View a major problem appears.  All of the entries appear to be shifted one day earlier.  So, for example, an event X which appears (correctly) to occur on day 2 in the Month and Day views, appears to occur (incorrectly) on day 1 in the list view.   I have tried individually removing the different calendars (work, home, exchange, etc.) and the problem persists.  I have also tried all of the suggestions posted in the thread dealing with duplicated and lost calender events, all to no avail.  I hope that someone can help with this.

    I have a similar problem on my new 4S. Syncing with Google calendars successfully for 2 years with my previous iPhone 3G, the newer handset has recently delivered the error you mentioned in your post - events being listed one day earlier than on my Day View, but worse than that, everything shifted to a Day before in all views.
    I seem to have recovered it now and it did this...
    Hard reset of iphone (made no difference actually).
    Backed up iPhone via Itunes.
    Switched off Calendar Sync under Google account on iphone (Settings/General) - deleted calendar on iphone as prompted onscreen.
    Switched Calendar sync back on iphone (under Settings/General/etc).
    Set my timezone on the iPhone to Manual for where I live (although on Auto is was already set correctly anyway)
    Result? I got my Day and Month view back properly but NOTHING appeared in List view until I did teh following:
    Under iPhoen Calendar - viedwed the list fo Calendars and unchecked mine (only one in my case which was Google Calendar). Re-checked it and then looked at list view and its all back correctly.
    Itrs true to say that this all started going wrong when I travelled into a different time zone two weeks ago, but that does not explain why when back in my own timezone it failed to correct itself. Another one of Apple's flakey implementations I guess. I moved away from using Mobile Me for calendar sync and will not use iCloud because it lost all my work calendar info and deleted my calendars on MobileME and Outlook on my PC. Since swicthing to Google calendar sync I have had no issues other than this recent thing above which I seem to have corrected.

  • New IPhone Birthdays are shifted 1 day

    i just upgraded from an IPhone 3 to a 4S.  All of the birthdays in my IPhone are shifted 1 day.  They are correct in ICal but not on the phone.  It looks like another manifestation of an old problem that has been around for years that Apple seems to not think is worth the time to fix.  Every time I updated my IPhone OS I have had a calendar problem.  This is like the last straw.  I thought that Apple wrote quality stuff.  I guess the press has gotten to their heads.  I am getting very tired of having to fix calendar issues - especially since I am syncing between Apple products - everytime the OS changes.  My wife and I never had this issue with our Treos.  Ok ancient history.  Why can't Apple get this right at least once?

    Jennifer,
      Thanks for the reply but nope.  I have both my IPhone 3 and 4S in front of me.  The 3 and my IMac are correct.  The 4S is not.  The sync was done on a brand new phone so a reset wont help.  Setting on my phone?  I doubt it as the IPhone 3 is correct.  If I go into an entry and for example change a birthday, save it sync and then change it back save it and sync it seems to fix the problem.  At least it did on the 2 entries that I tried.  So, this is most likely an IOS 5 issue.  Take a look in the community or on the web.  It does not seem that I am the only person having calendar issues.  Actually you can find a few hits for a calendar shift of one day.  Again, thanks anyway.

  • Can I switch calendars (Ex. "night shift" to "day shift" cal) with a repeating event, but ONLY for that one event??  It asks "for all events or only this event" if i change the time.  But it changes ALL events when i try and switch calendars.  Any help??

    I have 2 calendars set up for my work schedule, a "night shift" and "day shift" calendar.  I've set up repeating events fro Fri/Sat/Sun 3-11pm "night shifts" and Mon/Tues 7am-3pm "day shifts".  But lets say for example that I swap shifts and instead of working nights on Saturday like I normally would, I am now working days.  I want to change that in my calendar.  When I go to change the event, if i change the TIME it asks if i want to change all event or ONLY this event.  no problem....just this single event.  but when i go to change the event from the "night shift" calendar to the "day shift" calendar, it changes ALL the repeating events, and not just that one single event.   can anyone help with this???  am i doing something wrong?  is there a way to do this or not with the new iCal program???  i used to do this and never had any problems.    Thank you!

    You need to follow iPhoto terms since we only know what you tell us
    what are you calling folders - in iPhoto folders can not hold photos - albums hold photos and folders hold albums or other folders
    The basic default view of photo is by event (iPhoto '08 and later)
    Exactly what you you trying to do?
    LN

  • I am using numbers in the new iWork. Just bought it 10 days back. I am not able to figure out how to add serial umbers from 1 to 100( for example) also i need to freeze the top header like in windows so that we can browse down without the heading going of

    i am using numbers in the new iWork. Just bought it 10 days back. I am not able to figure out how to add serial umbers from 1 to 100( for example) also i need to freeze the top header like in windows so that we can browse down without the heading going off. Can some one help?

    Hi Jay,
    Be aware that "Freeze Header Rows" and "Freeze Header Columns" apply only to rows and columns that are Header rows or Header columns. You can have up to five Header rows, Five Header Columns (and five Footer rows) on a Numbers Table.
    "Header rows" is a special designation. Besides being able to be frozen, Header and Footer rows are not included in formulas referencing whole columns, making it possible to place formulas such as =SUM(B) at the top (or bottom) of column B without causing a self-reference error, These designated rows are also not included in sorts of the rows in a table.
    Regards,
    Barry

Maybe you are looking for