Date offset in Linux calendar

Hello,
I have written a bean to create a calendar.
I tested the jsp in windows and it works fine, but when uploaded to a debian linux server the dates populated are a day earlier. For example the program updates working days monday to friday on windows, but sunday to thursday on linux.
I know could fix the problem by changing the offset, but then I would have to maintain 2 classes, 1 for windows and 1 for debian.
I have checked the system date in linux and it is correct, not that this should influence the behaviour of my program.
I am assuming the line below that is causing the problem:
int first = cal.getFirstDayOfWeek(); // get first day of week
Is it possible that this line returns monday in windows and sunday in linux, if so do I need to change the type of calendar being used on linux??

I changed the offset and the program works on linux in the way I want, I would still like to know if the local can be changed if anyone can help

Similar Messages

  • HT4967 Is there a way to import data to an iCloud calendar if you don't have a Mac?

    What options exist for moving data INTO an iCloud calendar?  The only options I can find for importing data involve using iCal calendars on the Mac.
    I have an iPhone and an iPad and would like to manage my calendars via iCloud.  I have event data (most sports team schedules and the like for my kids) which I would like to "load" rather than typing in.  In the past, I always used CSV files (most of the data is distributed in Excel), ICS files, etc. and imported into Outlook.  Please don't tell me to sync with Outlook as I am trying to eliminate Outlook out of the equation.
    I just don't see any way to get data into an iCloud calendar other than typing it in or sync'ing with another calendar program.  Am I missing something? 

    Typing it in or Synchronizing are the only ways, but if you don't want to use Outlook (a stance I agree with) try eMClient. It's free for one user and 2 machines, Vista and Win7 are supported.

  • Why not Deprecate java.util.Date and java.util.Calendar

    With the introduction of java.time, why did you not flag java.util.Date and java.util.Calendar. These classes have been a bane to every Java developer and should never be used again with the introduction of Java 1.8.

    Adding the @Deprecated annotation would only just provide a warning about an old API and recommendation to the developer(s) to no longer use it. Doing so would not break any existing library out there; in fact quite a number of constructors and methods on the Date class have already been flagged deprecated.
    The new java.time package is far superior to Date/Calendar.

  • Java.sql.Date vs java.util.Date vs. java.util.Calendar

    All I want to do is create a java.sql.Date subclass which has the Date(String) constructor, some checks for values and a few other additional methods and that avoids deprecation warnings/errors.
    I am trying to write a wrapper for the java.sql.Date class that would allow a user to create a Date object using the methods:
    Date date1 = new Date(2003, 10, 7);ORDate date2 = new Date("2003-10-07");I am creating classes that mimic MySQL (and eventually other databases) column types in order to allow for data checking since MySQL does not force checks or throw errors as, say, Oracle can be set up to do. All the types EXCEPT the Date, Datetime, Timestamp and Time types for MySQL map nicely to and from java.sql.* objects through wrappers of one sort or another.
    Unfortunately, java.sql.Date, java.sql.Timestamp, java.sql.Time are not so friendly and very confusing.
    One of my problems is that new java.sql.Date(int,int,int); and new java.util.Date(int,int,int); are both deprecated, so if I use them, I get deprecation warnings (errors) on compile.
    Example:
    public class Date extends java.sql.Date implements RangedColumn {
      public static final String RANGE = "FROM '1000-01-01' to '8099-12-31'";
      public static final String TYPE = "DATE";
       * Minimum date allowed by <strong>MySQL</strong>. NOTE: This is a MySQL
       * limitation. Java allows dates from '0000-01-01' while MySQL only supports
       * dates from '1000-01-01'.
      public static final Date MIN_DATE = new Date(1000 + 1900,1,1);
       * Maximum date allowed by <strong>Java</strong>. NOTE: This is a Java limitation, not a MySQL
       * limitation. MySQL allows dates up to '9999-12-31' while Java only supports
       * dates to '8099-12-31'.
      public static final Date MAX_DATE = new Date(8099 + 1900,12,31);
      protected int _precision = 0;
      private java.sql.Date _date = null;
      public Date(int year, int month, int date) {
        // Deprecated, so I get deprecation warnings from the next line:
        super(year,month,date);
        if(! isWithinRange(this))
          throw new ValueOutOfRangeException((RangedColumn)this, "" + this);
      public Date(String s) {
        super(0l);
        // Start Cut-and-paste from java.sql.Date.valueOf(String s)
        int year;
        int month;
        int day;
        int firstDash;
        int secondDash;
        if (s == null) throw new java.lang.IllegalArgumentException();
        firstDash = s.indexOf('-');
        secondDash = s.indexOf('-', firstDash+1);
        if ((firstDash > 0) & (secondDash > 0) & (secondDash < s.length()-1)) {
          year = Integer.parseInt(s.substring(0, firstDash)) - 1900;
          month = Integer.parseInt(s.substring(firstDash+1, secondDash)) - 1;
          day = Integer.parseInt(s.substring(secondDash+1));
        } else {
          throw new java.lang.IllegalArgumentException();
        // End Cut-and-paste from java.sql.Date.valueOf(String s)
        // Next three lines are deprecated, causing warnings.
        this.setYear(year);
        this.setMonth(month);
        this.setDate(day);
        if(! isWithinRange(this))
          throw new ValueOutOfRangeException((RangedColumn)this, "" + this);
      public static boolean isWithinRange(Date date) {
        if(date.before(MIN_DATE))
          return false;
        if(date.after(MAX_DATE))
          return false;
        return true;
      public String getRange() { return RANGE; }
      public int getPrecision() { return _precision; }
      public String getType() { return TYPE; }
    }This works well, but it's deprecated. I don't see how I can use a java.util.Calendar object in stead without either essentially re-writing java.sql.Date almost entirely or losing the ability to be able to use java.sql.PreparedStatement.get[set]Date(int pos, java.sql.Date date);
    So at this point, I am at a loss.
    The deprecation documentation for constructor new Date(int,int,int)says "instead use the constructor Date(long date)", which I can't do unless I do a bunch of expensive String -> [Calendar/Date] -> Milliseconds conversions, and then I can't use "super()", so I'm back to re-writing the class again.
    I can't use setters like java.sql.Date.setYear(int) or java.util.setMonth(int) because they are deprecated too: "replaced by Calendar.set(Calendar.DAY_OF_MONTH, int date)". Well GREAT, I can't go from a Date object to a Calendar object, so how am I supposed to use the "Calendar.set(...)" method!?!? From where I'm sitting, this whole Date deprecation thing seems like a step backward not forward, especially in the java.sql.* realm.
    To prove my point, the non-deprecated method java.sql.Date.valueOf(String) USES the DEPRECATED constructor java.util.Date(int,int,int).
    So, how do I create a java.sql.Date subclass which has the Date(String) constructor that avoids deprecation warnings/errors?
    That's all I really want.
    HELP!

    I appreciate your help, but what I was hoping to accomplish was to have two constructors for my java.sql.Date subclass, one that took (int,int,int) and one that took ("yyyy-MM-dd"). From what I gather from your answers, you don't think it's possible. I would have to have a static instantiator method like:public static java.sql.Date createDate (int year, int month, int date) { ... } OR public static java.sql.Date createDate (String dateString) { ... }Is that correct?
    If it is, I have to go back to the drawing board since it breaks my constructor paradigm for all of my 20 or so other MySQL column objects and, well, that's not acceptable, so I might just keep my deprecations for now.
    -G

  • When syncing my iphone i get a msg, "itunes could not sync calendars to the iphone because an error occurred while merging data"   I sync my calendar to outlook.  My iphone calendar has all and the most updated information.  Outlook shows only recurringMY

    I'm at a loss as to what to do. Any help is appreciated.  When syncing my iphone I get an message, "itunes could not sync calendars to the iphone because an error ocurred while merging data" I sync my calendar to outlook.  My iphone calendar has all and the most updated information.  Outlook calendar only shows my recurring events. 

    hi there,
    i've found a great & simple solution for this problem
    just open your iCloud acc on iPhone
    turn off calendars (it wil ask you to keep info or not - KEEP IT!)
    and turn back on (MERGE!)
    now SYNC it..
    and that's it
    PS in my case it was contacts so the procedure is the same..

  • Oracle SQL HELP with convert GMT to EST and DST and Date offset

    Hi, I have a query that does not seem to work trying to convert a date field that is in GMT to est and using extract(timezone_hour FROM TO_TIMESTAMP_TZ as an offsetr
    HEre is my sql
    dtl.start_dt_gmt + (extract(timezone_hour FROM TO_TIMESTAMP_TZ( dtl.start_dt_gmt,'DD-MON-YYYY HH24:MI:SS TZH:TZM'))/24 ) START_DT_Local
    If the date (dtl.start_dt_gmt) is may 1 and gmt starts at 04:00 AM , the extract offset produces -4
    However, if the date (dtl.start_dt_gmt) is Feb 1 which begins at 05:00 AM GMT, the date offset still gives 04. What am i doing wrong? Any help would be appreciated. Thanks.
    Saul

    If your data is not associated with timezone then you'll have to use something like
    case when dt between A and B then dt-1/24 else dt end; <-- This will give you 1 hour back of EDT. So, as far as concern at database level, it is nothing to do at db level, because db is used by application, so you need to code in the app.
    Oracle never actually changes a TIMEZONE column value when you set your system to be on daylight savings time. There are several built-in DST DATE conversion functions for changing to daylight savings time:
    current_date
    current_timestamp
    localtimestamp
    dbtimezone
    sessiontimezone
    extract
    from_tz
    to_timestamp
    to_timestamp_tz
    to_yminterval tz_offset
    http://dba-oracle.com/t_oracle_daylight_saving_time_dst_date_conversion.htm
    Regards
    Girish Sharma

  • BEx variables: Date is outside Factory Calendar Image

    Good day
    A user received the following message when selecting the inpiut help for a date variable for a CRM query:
    " Date is outside Factory Calendar Image"
    I have checked tcode SCAL and noticed that the factory calendar for South Africa = 1996 to 2010. I checked the CRM source and their factory calendar is the same. In the mean time I have transferred the global settings for SAP DNI (parts) into BW and the factory calendar setting for South Africa now shows 1996 to 2015.
    Problem is that the CRM query still shows the same error message.
    Question:
    1) Should factory calendar settings for all SAP sources (Modules i.e. CRM...) be imported into BW, or is there another setting that I must check?
    Thanks in advance.
    Cj

    This is what I have done:
    Whe have the following R/3 modules (source systems in BW)
    SAP DNI
    SAP dFM
    SAP CRM
    SAP SRM
    etc.
    (Tcode = SCAL, selected 'factory calendar', selected 'rebuild tables')
    Firstly I have transferred the global settings for SAP CRM (as the BEX query is from CRM). Their factory date was 2012. This did not solve the problem.
    secondly, I did SAP DNI, their factory date = 2015, this also did not solve the problem.
    I then transferred the global settings for SAP dFM, our main reporting module, their factory date = 2020. The problem was solved.
    Seems as if only ONE of the modules depicts the factory calendar date for BEX.
    I have rested this again and only SAP dFM global settings rectified the BEx display problem.
    Hope this helps?

  • Billing plan date should be same as invoice date as per factory calendar

    Hi,
    We have two contracts, one is having billing plan material and another is having no billing plan material of same customer.When we go for the billing, as because these having all the header fields same it should give one single invoice of those two contracts,but its giving two invoices means the invoice splits.I check it and found, due to different billing date the invoice splits.If we go for VF04 we can force the billing date as same,but they are is a one batch running for this invoice.My invoice date of two contracts is 22.06.2014 which is factory calendar date and billing plan date is 26.06.2014 which is contract start date.My client is asking that can we get billing plan date same as invoice date as per factory calendar in standard to get single invoice? Kindly suggest me where is the settings.
    Thanks in Advance
    Regards,
    Braja

    Braja,
    Check this
    Goto  the billing plan tab in the corresponding line item and check the rule that is determined. Now go to the configuration of this rule table by using the path
    SPRO>SD> Billing> Billing Plan> Define rules for determining dates and choose your Applicable rule and click on the details.
    There you will see the Calendar ID field where you will have to maintain the applicable factory calendar. I think this should work and your billing date on the item relevant for billing plan should be the same as the other item.
    Hope this helps,
    Ravin

  • IBM MQ JMS data server in linux

    Guru's
    Need help.
    I configured the jms data server in linux ODI server for IBM MQ, my problem is while trying to access this data server from windows client i'm getting error.
    Can any body help with you suggestion whether we can access data server configured in linux through windows client?
    Please explain the how to make this work. I have to give this type of access to developers.
    Thanks

    Guru's
    Need help.
    I configured the jms data server in linux ODI server for IBM MQ, my problem is while trying to access this data server from windows client i'm getting error.
    Can any body help with you suggestion whether we can access data server configured in linux through windows client?
    Please explain the how to make this work. I have to give this type of access to developers.
    Thanks

  • Standard application configuration and data paths on Linux

    Hi,
    I have some problem with choosing proper place for application global configuration and data paths on Linux.
    I saw following paths for application configuration:
    /etc/app_name
    /etc/xdg/app_name
    /usr/share/app_name
    /usr/local/share/app_name
    /opt/app_name
    and following for application data:
    /usr/share/app_name
    /usr/local/share/app_name
    /opt/app_name
    Which directories are standard and distribution independent?
    best regards,
    Lukasz
    Last edited by lgro (2012-02-16 20:46:23)

    Wouldn't environment variables like XDG_DATA_HOME, XDG_CONFIG_DIRS, XDG_CONFIG_HOME, etc be best?
    Many languages' standard libraries have functions for accessing these effeciently in a distro-agnostic manner.

  • How do you transfer personal dates from last yr calendar into 2011 calendar

    I would like to just update photos for my new 2011 calendar and not have to manually enter all the personal Birthdays, etc. that I entered on last years calendar.
    Is there a way to do that?
    I tried to just duplicate the calendar from last year and then change the year to 2011 but it only brought over the photos, not the personal dates I had entered on last years calendar.
    I NEED HELP PLEASE as this is a gift for Grandparents and I don't have time to re-enter dates!!
    THANK YOU!!
    Message was edited by: gabismom

    Welcome to the Apple Discussions. Yes, there is a way. First open iCal, create a new calendar for birthdays and anniversaries and enter the text you want in each of the dates for birthdays, anniversaries and other events you want to appear in the iPhoto calendar.
    For existing calendars click on the Settings button at the bottom to bring up this window:
    Click to view full size
    There you can select the iCal calendar you created just for birthdays and anniversaries. That will automatically enter the data into the date squares of the calendar.
    Happy Holidays

  • Start date End date of the current Calendar month

    Hi All,
    How can we get the Start date of the Current Calendar month and the End date of the current Calendar month , when we given certain date in the selection screen.
    For Eg : In the Selection screen if I give date as Todays date 04042008, we should be getting the Start date of the month as 01042008 and End date of the month as 31042008.
    Any pointers will be much appreciated.
    Regards
    Rohini.

    Hi,
    Please refer the code below:
      CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET'
        EXPORTING
        i_gjahr              = sp_gjahr
    *     i_monmit             = gp_monat
          i_periv              = 'K4'
          i_poper              = sp_monat
    IMPORTING
         e_date               = gv_firstday
    EXCEPTIONS
       input_false          = 1
       t009_notfound        = 2
       t009b_notfound       = 3
       OTHERS               = 4
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    "Last day of the period
      CALL FUNCTION 'LAST_DAY_IN_PERIOD_GET'
        EXPORTING
          i_gjahr              = sp_gjahr
    *           I_MONMIT             = gp_monat
          i_periv              = 'K4'
          i_poper              = sp_monat
       IMPORTING
               e_date               = gv_lastday
             EXCEPTIONS
               input_false          = 1
               t009_notfound        = 2
               t009b_notfound       = 3
               OTHERS               = 4
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    Thanks,
    Sriram Ponna.

  • Dates greyed out in calendar date picker

    Hi,
    I have created a parameterised condition allowing users to enter two dates as part of a range
    join_date between :FromStartDate AND :ToEndDate
    On executing the worksheet , the runtime parameter dialog allows the user the option to choose the date from a calendar. On briefly testing this, I noticed that the initial dates displayed in the calendar dialog were from 2002. More importantly, on trying to 'pick' today's date for the :ToEndDate parameter, only 2 dates were selectable for this month. Is the choice of dates from the calendar dependant on the actual Join_date values in the database? I created the parameterised condition as part of the worksheet wizard,
    Thanks in advance for any confirmation of this,
    regards,
    Kevin.

    When you create the business area, what are you specifying in the Load Wizard Step 4? In that step you are asked if you want to generate additional objects. One of those choices involves date hierarchies. I always check that, and leave at the default of Default Date Hierarchy. Any date columns that come into my business area folders get automatically assigned to that default date hierarchy and get a LOV for them. When I take one of those date fields and make it a parameter in a work book, it automatically gets the LOV icon next to it (in Discoverer Plus) and has a pretty full choice of years to choose from. I admit to not knowing where it is getting the date data to select from, but it all works like magic as far as I am concerned. So you may want to look at how you create a business area, to see if maybe you need to change something in that process. You should not be having these kinds of problems. Unless maybe these column you want to use are not defined as date columns? So a couple of things to consider here.
    John Dickey

  • Bad resource data offset 0

    GraphicConverter (an image processing program) is dumping this message onto my console about 2 of my files:
    bad resource data offset 0 and size -928468624 in file
         I routinely check my file system with DiskUtility, Disk Warrior, etc. for any inconsistencies.  I can open the files fine from Finder; what is a "bad resource data offset" and does it mean anything about these files in my file system that I should be concerned about?

    Here's what I see when I do mdls on one of those files:
    kMDItemContentCreationDate
    = 2010-08-25 07:10:09 -0400
    kMDItemContentModificationDate = 2010-08-25 07:10:09 -0400
    kMDItemContentType        
    = "com.adobe.pdf"
    kMDItemContentTypeTree    
    = (
    "com.adobe.pdf",
    "public.data",
    "public.item",
    "public.composite-content",
    "public.content"
    kMDItemDisplayName        
    = "pnas00101-0399.pdf"
    kMDItemEncodingApplications
    = (
    "Apex PDFWriter"
    kMDItemFSContentChangeDate
    = 2010-08-25 07:10:09 -0400
    kMDItemFSCreationDate     
    = 2010-08-25 07:10:09 -0400
    kMDItemFSCreatorCode      
    = ""
    kMDItemFSFinderFlags      
    = 0
    kMDItemFSHasCustomIcon    
    = 0
    kMDItemFSInvisible        
    = 0
    kMDItemFSIsExtensionHidden
    = 0
    kMDItemFSIsStationery     
    = 0
    kMDItemFSLabel            
    = 0
    kMDItemFSName             
    = "pnas00101-0399.pdf"
    kMDItemFSNodeCount        
    = 0
    kMDItemFSOwnerGroupID     
    = 20
    kMDItemFSOwnerUserID      
    = 501
    kMDItemFSSize             
    = 1024494
    kMDItemFSTypeCode         
    = ""
    kMDItemKind               
    = "Adobe PDF document"
    kMDItemLastUsedDate       
    = 2012-05-24 07:57:45 -0400
    kMDItemNumberOfPages      
    = 8
    kMDItemPageHeight         
    = 747.6
    kMDItemPageWidth          
    = 493.44
    kMDItemSecurityMethod     
    = "None"
    kMDItemUsedDates          
    = (
    "2010-08-25 00:00:00 -0400",
    "2012-05-24 00:00:00 -0400"
    kMDItemVersion            
    = "1.3"

  • New WIn7 installed, prior data wiped. Empty contact lists and calendars. All stillon iPhone. What will synching do? Copy iPhone data to outlook contacts/calendar? or copy enpty PC files to iPhone, essentially deleting last place data is saved?

    New WIn7 installed, prior data wiped. Outlook (calendar and contacts) files empty.  Same lists however in the iPhone.  If I synch the iPhone and PC, what will happen? Will the iPhone data populate the  and, essentially, delete my last data resords? I know- prior to disc wipe, records entered either on PC or iPhone would cross copy to the iPhone or PC.  That was only 2 -4 records at a time.  We're talking >100 records at prresent.  Can I jut sync, and not worry amd find all contacts BOTH places?

    See also Recover your iTunes library from your iPod or iOS device.
    tt2

Maybe you are looking for

  • Status in WEB GOA "error in process"

    How can i extract in BBP_PD equivalent error in process" i want to extract what are the GOAs are in error in process" since i dont have a option to search via WEB Error in status? i have seen this status Released,Locked,In distribution,Distributed,Di

  • Backup across multiple DVD's (Deja Vu and Roxio Toast)

    Can anyone suggest software in order to do this? I need to get some information off my internal and external drives to free up some room. I'm running Deja Vu and they suggest "backing up to Roxio Toast" to do this but I'm not very familiar with this

  • Are ManagedObjects only useful after reverse-engineering?

    Hello, I would like to use the ManagedObjects API to get useful runtime information out of WLS 4.5 and 5.1. I read in the docs that BEA wanted to make this API public after 3.0, but I can't find the documentation for ManagedObjects. It would seem tha

  • I have the volume icon now all the time right in the middle of my screen

    Hello, I have an ipod touch 3rd gen and I have a problem. Suddenly the volume icon is smack dab in the middle of my screen a;ll the time. The volume button , top one also turns on and off my ipod touch the lower one does nothing. Can anyone help me w

  • Mach_kernel connecting to ip's and hosts

    I am not using a torrent program but still the mach_kernel is connecting to host addresses and IPs I am a bit worried about this... I know that if you're using torrent clients that they cause the mach_kernel to establish connections... but this is no