I created an application and in  that application if date is changed the application starts from splash screen on re-entering and if date is not changed and u re-enters the application then it open in page where u leaved.Not working in USA timezone.

I created an application and in  that application if date is changed the application starts from splash screen on re-entering and if date is not changed and u re-enters the application then it open in page where u leaved.It works fine in our side (Timezone,kolkata ,india even for Timezone,slvaniya,USA) but our USA client is telling that on changing the date it not starts from start-up sequence.Can anyone plz suggest the reason for it.

This is the code which we have used.
//////////Return if it is first time for the day or not//////////////
+ (BOOL)isFirstTimeToday {
BOOL result = YES;
NSDate *now = [[NSDate alloc] init];     /// represents the current time
NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
NSDateComponents *components = [gregorian components:(NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit) fromDate: now];
NSDate *today = [gregorian dateFromComponents:components];
[now release];
[gregorian release];
NSDate *savedDate = [[NSUserDefaults standardUserDefaults] objectForKey:LAST_TIME_VISITED];
if (savedDate) {
if ([today earlierDate:savedDate] == today) {
result = NO;
return result;
////////Stores the date/////////////
+ (void)userDidVisitReenforceScreenToday {
[[NSUserDefaults standardUserDefaults] setObject:[NSDate todayAtMidnight] forKey:LAST_TIME_VISITED];
////////////What [NSDate todayAtMidnight] stores/////////////////////
+ (NSDate *)daysFromNowAtMidnight:(NSInteger)nOfDays {
NSDate *date = [NSDate dateWithTimeIntervalSinceNow: (86400*nOfDays)];
NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
NSDateComponents *components = [gregorian components:(NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit) fromDate: date];
NSDate *dateAtMidnight = [gregorian dateFromComponents:components];
[gregorian release];
NSLog(@"dateAtMidnight : %@",dateAtMidnight);
return dateAtMidnight;
+ (NSDate *)todayAtMidnight {
return [self daysFromNowAtMidnight:0];
Please Suggest..

Similar Messages

  • I created an application and in  that application if date is changed the application starts from splash screen on re-entering and if date is not changed and u re-enters the application then it open in page where u leaved.It works with iPod not with iPhone

    I created an application and in  that application if date is changed the application starts from splash screen on re-entering and if date is not changed and u re-enters the application then it open in page where u leaved.It works with iPod not with iPhone

    Try posting in the developer forums to see if you can get some assistance,you'll have to be a registered developer for access though.
    developer.apple.com

  • I have a 2009 MB Pro. I have been trying to do some cleaning of files and discovered that in Finder, All Images, I am experiencing a frustrating problem. I spent a few hours trashing over 4K images and within a few hours, I had as many more. Help!

    I have a 2009 MB Pro. I have been trying to do some cleaning of files and discovered that in Finder, All Images, I am experiencing a frustrating problem. I spent a few hours trashing over 4K images and within a few hours, I had as many more.  I did a couple of thousand trashed images and half hour later, more arrived. There are a lot of images that seem off the internet, including gif.s, png.s. Help!

    First, back up all data immediately, as your boot drive might be failing.
    There are a few other possible causes of generalized slow performance that you can rule out easily.
    Reset the System Management Controller.
    If you have many image or video files on the Desktop with preview icons, move them to another folder.
    If applicable, uncheck all boxes in the iCloud preference pane.
    Disconnect all non-essential wired peripherals and remove aftermarket expansion cards, if any.
    Check your keychains in Keychain Access for excessively duplicated items.
    If you have more than one user account, you must be logged in as an administrator to carry out this step.
    Launch the Console application in the same way you launched Activity Monitor. Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Select the 50 or so most recent entries in the log. Copy them to the Clipboard (command-C). Paste into a reply to this message (command-V). You're looking for entries at the end of the log, not at the beginning.
    When posting a log extract, be selective. Don't post more than is requested.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some personal information, such as your name, may appear in the log. Anonymize before posting. That should be easy to do if your extract is not too long.

  • Hi, we need to create the test environment from our production for oracle AP Imaging. we have soa,ipm,ucm and capture managed servers in our weblogic. can anyone tell me what is the best way to clone the environment, can I just tar the weblogic file syste

    Hi, we need to create the test environment from our production for oracle AP Imaging. we have soa,ipm,ucm and capture managed servers in our weblogic..
    Can anyone tell me what is the best way to cloning the application from different environment, the test and production are in different physical server.
    Can I just tar the weblogic file system and untar it to the new server and make the necessary changes?
    Can anyone share their experiences and how to with me?
    Thank in advance.
    Katherine

    Hi Katherine,
    yes and no . You need as well weblogic + soa files as the database schemas (soa_infra, mds...).
    Please refer to the AMIS Blog: https://technology.amis.nl/2011/08/11/clone-your-oracle-fmw-soa-suite-11g/
    HTH
    Borys

  • Safari is not able to open this page because it can not find the server.

    I too need help with this problem with my Ipod touch. Currently, I am in the Ukraine, go to a wifi cafe, access the wifi and get a clear powerful signal. Then I try to load the Google page, any page from my bookmark or write the web address in and I receive the same message; "Safari can not open this page because it can not find the server." Something is wrong with my settings and I tried to reset the options but it does not work. Can anyone help me with this problem? Thanks!!

    Hello and Welcome to Apple Discussions. 
    The 169.254.xxx.xxx address indicates that there is a problem with DHCP server in your BT Digital Hub (Home hub?) because the iPod is taking a default IP rather than been given a suitable one. At the moment the iPod is not even in the same subnet as the router so it's no wonder that Safari can't find the Internet.
    Ensure that the DHCP server is on and that you have an IP-address pool sufficiently large to serve all the devices you have. I'd expect it to be 192.168.1.1 to 192.168.1.253. If you have FON enabled you certainly need that wider range as other people may be using your router too.
    mrtotes

  • I cannot open my Yahoo Mail but everything else is OK.  When I click Yahoo Mail Icon, I get this error message "Safari Cannot open this page.  Safari can not establish secure connection with Yahoo Mail.

    I cannot open my Yahoo Mail but everything else is OK.  When I click Yahoo Mail Icon, I get this error message "Safari Cannot open this page.  Safari can not establish secure connection with Yahoo Mail.

    It sounds as though a script on the site, or an advertisement, is not working quite right...
    When you have a problem with one particular site, a good "first thing to try" is clearing your Firefox cache and deleting your saved cookies for the site.
    (1) Bypass Firefox's Cache
    Use Ctrl+Shift+r to reload the page fresh from the server.
    (You also can clear Firefox's cache completely using:
    orange Firefox button ''or'' Tools menu > Options > Advanced
    On the Network mini-tab > Cached Web Content : "Clear Now")
    (2) Remove the site's cookies using either of these. Save any pending work first.
    While viewing a page on the site:
    * right-click and choose View Page Info > Security > "View Cookies"
    * Alt+t (open the classic Tools menu) > Page Info > Security > "View Cookies"
    Then try reloading the page. Does that help?

  • HT4927 I have just downloaded iPhoto from the app store. The photo library from my old laptop was backed up on an external hard drive and I retrieved the photos from there.  Now when I open the photos on my new Mac Book Pro, they are small - am I missing

    I have just downloaded iPhoto from the app store. The photo library from my old laptop was backed up on an external hard drive and I retrieved the photos from there.  Now when I open the photos on my new Mac Book Pro, they are small - am I missing something?
    I am using 10.8.2 Mountain Lion btw

    I dragged the Photo library icon from the backup drive on to iPhoto on the laptop
    That means you imported one Library to another.
    Never import one Library to another. Every version and thumbnail is imported like a distinct photo, you lose all your Albums, Keywords etc., the link between Original and Previews is destroyed, the non-destructive editing feature is ruined and so on. In summary: it's mess.
    So the reason you're seeing small photos is because you're seeing the iPhoto thumbnails from the back up library.
    So, what to do?
    Do you still have the back up? If so, trash this bunged up library and restore from the back up again. HOw to restore will depend entirely on how you made the back up, but no version of restoring includes importing the library.
    Regards
    TD

  • Has anyone else noticed that: "The OS X Lion v10.7.3 Update includes Safari 5.1.3 and fixes that: Resolve a Wi-Fi connection issue when waking from sleep" didn't work?

    I installed OS X Lion v10.7.3 because of the following claim.
    The OS X Lion v10.7.3 Update includes Safari 5.1.3 and fixes that:
    Resolve a Wi-Fi connection issue when waking from sleep
    It continues to be a real pain having to reconnect to the network each time I wake my MacBook Air from sleep.
    Does anyone have a suggestion for the resolution to this problem?

    It seems the update fixed old problems for some and caused new problems for others. Sorry to hear you're in the latter group.
    Here are some things to try.
    1. Go to System Preferences > Network, and click the gear icon under the network interfaces like so:
    Whatever service order you have set, drag Wi-Fi either to the top (assuming it's not already there) or someplace else in the list. Click OK and then Apply. Sleep the system then wake it again to observe any changes.
    2. Click Wi-Fi in the above then click Advanced. Select all the networks your computer has ever joined and delete them with the "-" button. OK then Apply again. Select your network under the AirPort icon to re-join it. Sleep and wake again to see if that did anything.
    3. Try creating a new, temporary user account. Log in under that account to see if its behavior is any different.
    You may have done all of these already but perhaps there is something you have not thought of. If nothing helps we may just have to wait a bit longer for Apple to release a fix.

  • My Time Capsule is giving me a warning that  double NAT situation is occurring and recommends that I set it to bridge mode What is all this about please can it be explained in layman's terms and not martian thank you.

    My Time Capsule is giving me a warning that  double NAT situation is occurring and recommends that I set it to bridge mode What is all this about please can it be explained in layman's terms and not martian thank you.

    You have two devices....the Netgear and Time Capsule both configured to act as routers on the network. You only want one device providing this service.
    I suggest that you configure the Time Capsule in Bridge Mode as suggested to eliminate the Double NAT error. Unfortunately, the Guest Network cannot be enabled in this setting.
    No other adjustments are needed and everything else will operate normally...and the Time Capsule will still be providing your wireless network signal.
    Once the Time Capsule is configured in Bridge Mode, it would be an excellent idea to perform a complete power cycle on the network to allow things to reset properly.
    Just power off all devices on the network in any order that you want
    Wait a minute
    Start the Netgear device first, and let it run a minute by itself
    Start the Time Capsule next the same way
    Continue starting devices one at a time the same way until everything is powered backup
    The other option you have is to "ignore" the error and the light will turn green. The Double NAT error may...or may not cause some issues for you down the line. The next time that you update the Mac operating system, or update the firmware in the Time Capsule, it may likely change the Time Capsule to Bridge Mode automatically.
    If your Guest Network "disappears", you will know why this happened, and you will have to manually configure the Time Capsule again in Router Mode to provide DHCP and NAT services.
    Double NAT can also cause a slow down of web page loading. You may...or may not....notice this.

  • I have some videos that are completely well shown when using any media player, but some parts of the video appear with red screens when I try to edit them on Adobe Premier. Does anyone knows the reason?

    I have some videos that are completely well shown when using any media player, but some parts of the video appear with red screens when I try to edit them on Adobe Premier. Does anyone knows the reason?

    More information needed for someone to help... please click below and provide the requested information
    -PPro Information FAQ http://forums.adobe.com/message/4200840
    Plus, EXACTLY what are you editing?
    Codec & Format information, with 2 links inside for you to read http://forums.adobe.com/thread/1270588
    Report back with the codec details of your file, use the programs below... A screen shot works well to SHOW people what you are doing
    http://forums.adobe.com/thread/592070?tstart=30 for screen shot instructions
    Free programs to get file information for PC/Mac http://mediaarea.net/en/MediaInfo/Download

  • When trying to make calls the timer starts counting as if i am connected but i can't hear anything and my speaker button has turned blue

    when trying to make calls the timer starts counting as if i am connected but i can't hear anything and my speaker button has turned blue

    Did you use the latest backup after setting it up "as new device"? If yes, try again, this time without using the backup, maybe it contains damaged data causing your problem.
    If this does not bring any change, you should get it serviced.

  • TS3899 I have just set up an email account on my  ipod touch. Just received an email on my computer and the mail icon shows one new message. But when I click on mail icon it opens a page for New Account not an inbox??

    Having just set up my Ipod Touch with my email account (pop3) the mail icon on it shows a 1 for new message. However when I click on the Mail icon it brings up a page for NEW ACCOUNT not any inbox. Can anyone help?

    You might want to try removing they email account and setting it back up again

  • HT1212 I just bought a new ipod touch from a friend but she didn't reset it and everytime that I try to rest it, it keeps saying "Ipod is disable, connect to Itunes" but I'am connected to Itunes and it also says put in correct passcode?? how do I reset it

    I just bought a new Ipod ios from a friend and she didn't reset it before she gave it to me and when I try to connect it to my laptop it keeps saying "Ipod is disable, connect to itunes"and it says to put in the correct passcode but I don't know what the passcode is and now I can't get ahold of my friend that sold it to me. So my question is: How do I reset the passcode and the Ipod touch so that I can sync it to my laptop and so that I can enjoy my new Ipod Touch?

    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    iOS: Wrong passcode results in red disabled screen                         
    If recovery mode does not work try DFU mode.                        
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings        
    For how to restore:
    iTunes: Restoring iOS software
    To restore from backup see:
    iOS: How to back up     
    If you restore from iCloud backup the apps will be automatically downloaded. If you restore from iTunes backup the apps and music have to be in the iTunes library since synced media like apps and music are not included in the backup of the iOS device that iTunes makes.
    You can redownload most iTunes purchases by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store        

  • Opening web pages in email has stopped working after upgrade of ios

    I cannot open web pages in email, or indeed even scroll them. only change recently as upgrade to ios 7. I can come out of mail and open in safari, but very annoying!!

    replicate the error and paste the error from defaultrace from server0\log.
    regards,
    snehal

  • HT2534 I installed the Kobo app and the logo appears on my screen but when I try to activiate it, my password and email address is not recognizied.  Is my password the same as my Apple ID password?

    I installed the Kobo app on my Ipad mini and the logo appears on my screen b ut when I try to activate it a password is asked for.  I entered my Apple ID password.  Is this not correct?

    No, you need to use the account id and password that you've set up with Kobo, the app is linked to your account with them so that you can download your kobo purchases into it

Maybe you are looking for