Search Results

Search found 19 results on 1 pages for 'kamchatka'.

Page 1/1 | 1 

  • UINavigationController leak/understanding popViewController

    - by Kamchatka
    Hello, I have a navigation controller and a table view. When someone click on the table view, I do the following: MyViewController *myViewController = [[MyViewController alloc] initWithImage:image]; [image release]; [self.navigationController pushViewController:myViewController animated:YES]; [myViewController release]; myViewController will retain the image. Now, if I go back and forth in the NavigationController, I get a leak because a new MyViewController gets created each time and apparently the popViewController doesn't release the myViewController. My question: Why doesn't popViewController release the controller? How should I handle that? Put the myViewController as a member of my class and check if it already exists instead of creating it each time? Thanks in advance for your help,

    Read the article

  • How do I change my iPhone App binary filename

    - by Kamchatka
    I get the following error when I try to upload the application on iTunes Connect: "Binary file names cannot contain a space. Please rename your binary file and try again." If I try to Validate the Application in XCode, I get: "My Application.ipa: filename may not contain whitespace" So I guess I have to find a way to rename this .ipa file. I don't want to change my product name which has to stay "My Application". How can I do that? Thanks!

    Read the article

  • Memory leak with NSData

    - by Kamchatka
    I'm having a leak with this code without being able to find where it's coming from. This function get called within an autorelease pool. I release the IplImage* image argument. When I run the ObjAlloc tool, it tells me that "NSData* data" is leaking. If I try to manually release the UIImage returned by this function, I get an EXC_BAD_ACCESS error, probably because this UIImage is autoreleased. I'm a bit confused, any hint would be appreciated. Thanks! UIImage *UIImageFromIplImage(IplImage *image) { NSLog(@"IplImage (%d, %d) %d bits by %d channels, %d bytes/row %s", image->width, image->height, image->depth, image->nChannels, image->widthStep, image->channelSeq); CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); NSData *data = [NSData dataWithBytes:image->imageData length:image->imageSize]; CGDataProviderRef provider = CGDataProviderCreateWithCFData((CFDataRef)data); CGImageRef imageRef = CGImageCreate(image->width, image->height, image->depth, image->depth * image->nChannels, image->widthStep, colorSpace, kCGImageAlphaNone|kCGBitmapByteOrderDefault, provider, NULL, false, kCGRenderingIntentDefault); UIImage *ret = [UIImage imageWithCGImage:imageRef]; CGImageRelease(imageRef); CGDataProviderRelease(provider); CGColorSpaceRelease(colorSpace); return ret; }

    Read the article

  • Gamma Distribution in Boost

    - by Kamchatka
    Hello, I'm trying to use the Gamma distribution from boost::math but it looks like it isn't possible to use it with boost::variate_generator. Could someone confirm that? Or is there a way to use it. I discovered that there is a boost::gamma_distribution undocumented that could probably be used too but it only allows to choose the alpha parameter from the distribution and not the beta. Thanks!

    Read the article

  • UIImage Rotation

    - by Kamchatka
    I display an image in a UIImageView (within a UIScrollView) which is also stored in CoreData. In the interface, I want the user to be able to rotate the picture by 90 degrees. I also want it to be saved in CoreData. What should I rotate in the display? the scrollview, the uiimageview or the image itself? (If possible I would like the rotation to be animated) But then I also have to save the picture to CoreData. I thought about changing the image orientation but this property is readonly.

    Read the article

  • Accessory view in UITableView: view doesn't update

    - by Kamchatka
    I'm trying to add checkmarks to items when the user select rows in a table view. However, the view is not refreshed and the checkmarks do no show up: - (void)tableView:(UITableView *)tv didSelectRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell* oldCell = [self tableView:tv cellForRowAtIndexPath:[NSIndexPath indexPathForRow:selectedIndex inSection:0]]; oldCell.accessoryType = UITableViewCellAccessoryNone; if (indexPath.section == 0) { selectedIndex = indexPath.row; } UITableViewCell* newCell = [self tableView:tv cellForRowAtIndexPath:indexPath]; newCell.accessoryType = UITableViewCellAccessoryCheckmark; [tv deselectRowAtIndexPath:indexPath animated:NO]; } What could be a reason for that?

    Read the article

  • NSEntityDescription entityForName returning nil

    - by Kamchatka
    Hi, I did some changes to my model (but I don't want migration yet, so I just remove the application, built clean etc.) so my application works in the simulator. However, when I run it on the iPhone, I get the following error: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'executeFetchRequest:error: A fetch request must have an entity.' I set the entity like this: NSEntityDescription *entity = [NSEntityDescription entityForName:@"Document" inManagedObjectContext:managedObjectContext]; My managedObjectContext is not nil. But I suspect that it doesn't load the object model correctly or something similar because If I display the entities in the model, the list is empty. How can I make sure the model is loaded? Thanks,

    Read the article

  • Display shift when adding rows to UITableView

    - by Kamchatka
    Hello, I have a UITableView displaying an underlying NSFetchedResultsController. When the fetchedResultsController is updated, - (void)controller:(NSFetchedResultsController *)controller didChangeObject:(id)anObject atIndexPath:(NSIndexPath *)indexPath forChangeType:(NSFetchedResultsChangeType)type newIndexPath:(NSIndexPath *)newIndexPath { is called. And the following is executed: case NSFetchedResultsChangeInsert: [tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:shiftedIndexPath] withRowAnimation:UITableViewRowAnimationFade]; break; The cellForRowAtIndexPath is only called for the new line (which is logical) The problem is however that all the values displayed in the rows of the table view are shifted down. The first row displays its title. The second rows displays the first row's title. The third row the second row's title etc. If I repeat that, the third row will display the second's row title, the fourth the third row's title etc. I don't understand what can happen, especially because cellForRowAtIndexPath is only called for the new line (which is logical) and not for all these lines. Additionally, if I click on these lines which have the wrong title, it opens the right document (didSelectRowAtIndexPath works correctly with the indexPath) Any clue of what could happen? Thanks!

    Read the article

  • Handle row deletion in UITableViewController

    - by Kamchatka
    Hello, I hava a UINavigationController. The first level is a UITableViewController, the second level just shows details on one of the items of the table view. In this detail view, I can delete the item. It deletes the underlying managed object. When I pop back to the view, I have a crash. I understand why, it's because I didn't update the cached array that contains the data. I looked at several tutorials and I don't exactly understand how am I supposed to handle deletion. Maybe I don't understand exactly where I should fetch the objects in the model. Should I do a query for every cellForRowAtIndexPath and take the item in the result at position indexPath.row? It doesn't look efficient. Should I check for changes somewhere and recache the whole query in an array. I would think CoreData would provide something more natural but I couldn't find it so far. Thanks in advance.

    Read the article

  • Memory Warning but Small Live Bytes

    - by Kamchatka
    Hi everyone, In my application, I get a memory warning of level 1 and then 2 after repeating some action (choosing a picture + processing) several times and then a crash. The leak tool doesn't show any leak. I'm also following the Allocations tool in Instruments and my Live Bytes are roughly 4 MB, overall I allocate 113 MB. At maximum I have maybe 20 MB in memory when the picture is loaded. Since I have to repeat an action to get to the crash, it is very likely to be a memory leak. However, I don't know how to locate it since my live bytes are 4 MB and things supposed to be allocated (apart a small leak of ~100 KB in the UIImagePickerController). How much can I trust the memory leak/allocation tools? Would you have an advice to help me locate the reason of the problem?

    Read the article

  • Out-Of-Memory while doing Core Data migration

    - by Kamchatka
    Hello, I'm migrating a CoreData model between two versions of an application. I was storing binary data as blobs in the previous version and I want to take them out of the blobs for performance. My issue is that during the migration it seems that Core Data loads everything into memory which leads to Low Memory Warnings and then to my app being killed. Apple documentation suggests the following : http://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CoreDataVersioning/Articles/vmCustomizingTheProcess.html#//apple_ref/doc/uid/TP40005510-SW9 However, it seems to rely on the fact that the large objects are applied different mapping. In my case, all the objects are basically the same and the same mapping has to be applied to each of them. I don't see in this case how I could apply their technique. How should I handle a migration with very large objects ?

    Read the article

  • Leak in managedObjectContext save:

    - by Kamchatka
    Hi I have the following piece of code and when I use Instruments/Object Allocations, it tells me that there is a leak there (which goes down to sqlite3MemMalloc). Is there something that I should release? if (![managedObjectContext save:&error]) { NSLog(@"Error while saving."); } The save works well and doesn't trigger an error.

    Read the article

  • awakeFromNib and loadView execute for different instances

    - by Kamchatka
    Hi, I'm trying to understand why: NSLog(@"self = %p", self); in awakeFromNib prints a different value than the same NSLog in viewDidLoad? This isn't a huge problem because I don't need the awakeFromNib but I would like to understand how it works. The code that creates the controller is the following: MyViewController *myViewController = [[MyViewController alloc] initWithNibName:@"MyViewController" bundle:nil]; myViewController.image = tmpImage; [self.navigationController pushViewController:myViewController animated:YES]; [myViewController release]; Thanks for any advices!

    Read the article

  • Referencing file on disk from NSManagedObject

    - by Kamchatka
    Hello, What would be the best way to name a file associated to a NSManagedObject. The NSManagedObject will hold the URL to this file. But I need to create a unique filename for my file. Is there some kind of autoincrement id that I could use? Should I use mktemp (but it's not a temporary file) or try to convert the NSManagedObjectId to a filename? but I fear there will be special characters which might cause problem. What would you suggest?

    Read the article

  • Custom cell and Delete/Move indicators

    - by Kamchatka
    Hello, I have a custom UITableViewCell. However, when I got in edit mode, I don't have any Delete and Move indicators appearing. The custom cell draws itself in the contentView. In layoutSubviews, I make sure there is space on the left and one the right of the contentView so that the controls can appear (if this was the problem). - (void)layoutSubviews { self.contentView.frame = CGRectMake(50, 0, self.frame.size.width - 100, sub.thumbnail.size.height + 20); } In the UITableViewController, I return YES in: - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath { How could I solve this lack of interactivity. Is there something specific for custom cells? Thanks!

    Read the article

  • CoreData leak when reading a property

    - by Kamchatka
    Hello, I have the following code in a loop iterating over the different document objects: NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; [document primitiveValueForKey:@"data"]; [data writeToFile:filename atomically:NO]; [document.managedObjectContext refreshObject:document mergeChanges:NO]; [pool release]; The "data" property is a large blob (a 1MB image). And as I monitor the memory with the Allocation Instrument memory usage is increasing. I cannot find where the leak is coming from and how to remove it. Thanks!

    Read the article

  • Generating a drop down list of timezones with PHP

    - by Xeoncross
    Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need help knowing which of these would be the best to attempt to use when trying to get the UTC offset from the user on register. One: <option value="-12">[UTC - 12] Baker Island Time</option> <option value="-11">[UTC - 11] Niue Time, Samoa Standard Time</option> <option value="-10">[UTC - 10] Hawaii-Aleutian Standard Time, Cook Island Time</option> <option value="-9.5">[UTC - 9:30] Marquesas Islands Time</option> <option value="-9">[UTC - 9] Alaska Standard Time, Gambier Island Time</option> <option value="-8">[UTC - 8] Pacific Standard Time</option> <option value="-7">[UTC - 7] Mountain Standard Time</option> <option value="-6">[UTC - 6] Central Standard Time</option> <option value="-5">[UTC - 5] Eastern Standard Time</option> <option value="-4.5">[UTC - 4:30] Venezuelan Standard Time</option> <option value="-4">[UTC - 4] Atlantic Standard Time</option> <option value="-3.5">[UTC - 3:30] Newfoundland Standard Time</option> <option value="-3">[UTC - 3] Amazon Standard Time, Central Greenland Time</option> <option value="-2">[UTC - 2] Fernando de Noronha Time, South Georgia &amp; the South Sandwich Islands Time</option> <option value="-1">[UTC - 1] Azores Standard Time, Cape Verde Time, Eastern Greenland Time</option> <option value="0" selected="selected">[UTC] Western European Time, Greenwich Mean Time</option> <option value="1">[UTC + 1] Central European Time, West African Time</option> <option value="2">[UTC + 2] Eastern European Time, Central African Time</option> <option value="3">[UTC + 3] Moscow Standard Time, Eastern African Time</option> <option value="3.5">[UTC + 3:30] Iran Standard Time</option> <option value="4">[UTC + 4] Gulf Standard Time, Samara Standard Time</option> <option value="4.5">[UTC + 4:30] Afghanistan Time</option> <option value="5">[UTC + 5] Pakistan Standard Time, Yekaterinburg Standard Time</option> <option value="5.5">[UTC + 5:30] Indian Standard Time, Sri Lanka Time</option> <option value="5.75">[UTC + 5:45] Nepal Time</option> <option value="6">[UTC + 6] Bangladesh Time, Bhutan Time, Novosibirsk Standard Time</option> <option value="6.5">[UTC + 6:30] Cocos Islands Time, Myanmar Time</option> <option value="7">[UTC + 7] Indochina Time, Krasnoyarsk Standard Time</option> <option value="8">[UTC + 8] Chinese Standard Time, Australian Western Standard Time, Irkutsk Standard Time</option> <option value="8.75">[UTC + 8:45] Southeastern Western Australia Standard Time</option> <option value="9">[UTC + 9] Japan Standard Time, Korea Standard Time, Chita Standard Time</option> <option value="9.5">[UTC + 9:30] Australian Central Standard Time</option> <option value="10">[UTC + 10] Australian Eastern Standard Time, Vladivostok Standard Time</option> <option value="10.5">[UTC + 10:30] Lord Howe Standard Time</option> <option value="11">[UTC + 11] Solomon Island Time, Magadan Standard Time</option> <option value="11.5">[UTC + 11:30] Norfolk Island Time</option> <option value="12">[UTC + 12] New Zealand Time, Fiji Time, Kamchatka Standard Time</option> <option value="12.75">[UTC + 12:45] Chatham Islands Time</option> <option value="13">[UTC + 13] Tonga Time, Phoenix Islands Time</option> <option value="14">[UTC + 14] Line Island Time</option> Or using PHP friendly values: <option value="Pacific/Midway">(GMT-11:00) Midway Island, Samoa</option> <option value="America/Adak">(GMT-10:00) Hawaii-Aleutian</option> <option value="Etc/GMT+10">(GMT-10:00) Hawaii</option> <option value="Pacific/Marquesas">(GMT-09:30) Marquesas Islands</option> <option value="Pacific/Gambier">(GMT-09:00) Gambier Islands</option> <option value="America/Anchorage">(GMT-09:00) Alaska</option> <option value="America/Ensenada">(GMT-08:00) Tijuana, Baja California</option> <option value="Etc/GMT+8">(GMT-08:00) Pitcairn Islands</option> <option value="America/Los_Angeles">(GMT-08:00) Pacific Time (US & Canada)</option> <option value="America/Denver">(GMT-07:00) Mountain Time (US & Canada)</option> <option value="America/Chihuahua">(GMT-07:00) Chihuahua, La Paz, Mazatlan</option> <option value="America/Dawson_Creek">(GMT-07:00) Arizona</option> <option value="America/Belize">(GMT-06:00) Saskatchewan, Central America</option> <option value="America/Cancun">(GMT-06:00) Guadalajara, Mexico City, Monterrey</option> <option value="Chile/EasterIsland">(GMT-06:00) Easter Island</option> <option value="America/Chicago">(GMT-06:00) Central Time (US & Canada)</option> <option value="America/New_York">(GMT-05:00) Eastern Time (US & Canada)</option> <option value="America/Havana">(GMT-05:00) Cuba</option> <option value="America/Bogota">(GMT-05:00) Bogota, Lima, Quito, Rio Branco</option> <option value="America/Caracas">(GMT-04:30) Caracas</option> <option value="America/Santiago">(GMT-04:00) Santiago</option> <option value="America/La_Paz">(GMT-04:00) La Paz</option> <option value="Atlantic/Stanley">(GMT-04:00) Faukland Islands</option> <option value="America/Campo_Grande">(GMT-04:00) Brazil</option> <option value="America/Goose_Bay">(GMT-04:00) Atlantic Time (Goose Bay)</option> <option value="America/Glace_Bay">(GMT-04:00) Atlantic Time (Canada)</option> <option value="America/St_Johns">(GMT-03:30) Newfoundland</option> <option value="America/Araguaina">(GMT-03:00) UTC-3</option> <option value="America/Montevideo">(GMT-03:00) Montevideo</option> <option value="America/Miquelon">(GMT-03:00) Miquelon, St. Pierre</option> <option value="America/Godthab">(GMT-03:00) Greenland</option> <option value="America/Argentina/Buenos_Aires">(GMT-03:00) Buenos Aires</option> <option value="America/Sao_Paulo">(GMT-03:00) Brasilia</option> <option value="America/Noronha">(GMT-02:00) Mid-Atlantic</option> <option value="Atlantic/Cape_Verde">(GMT-01:00) Cape Verde Is.</option> <option value="Atlantic/Azores">(GMT-01:00) Azores</option> <option value="Europe/Belfast">(GMT) Greenwich Mean Time : Belfast</option> <option value="Europe/Dublin">(GMT) Greenwich Mean Time : Dublin</option> <option value="Europe/Lisbon">(GMT) Greenwich Mean Time : Lisbon</option> <option value="Europe/London">(GMT) Greenwich Mean Time : London</option> <option value="Africa/Abidjan">(GMT) Monrovia, Reykjavik</option> <option value="Europe/Amsterdam">(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna</option> <option value="Europe/Belgrade">(GMT+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague</option> <option value="Europe/Brussels">(GMT+01:00) Brussels, Copenhagen, Madrid, Paris</option> <option value="Africa/Algiers">(GMT+01:00) West Central Africa</option> <option value="Africa/Windhoek">(GMT+01:00) Windhoek</option> <option value="Asia/Beirut">(GMT+02:00) Beirut</option> <option value="Africa/Cairo">(GMT+02:00) Cairo</option> <option value="Asia/Gaza">(GMT+02:00) Gaza</option> <option value="Africa/Blantyre">(GMT+02:00) Harare, Pretoria</option> <option value="Asia/Jerusalem">(GMT+02:00) Jerusalem</option> <option value="Europe/Minsk">(GMT+02:00) Minsk</option> <option value="Asia/Damascus">(GMT+02:00) Syria</option> <option value="Europe/Moscow">(GMT+03:00) Moscow, St. Petersburg, Volgograd</option> <option value="Africa/Addis_Ababa">(GMT+03:00) Nairobi</option> <option value="Asia/Tehran">(GMT+03:30) Tehran</option> <option value="Asia/Dubai">(GMT+04:00) Abu Dhabi, Muscat</option> <option value="Asia/Yerevan">(GMT+04:00) Yerevan</option> <option value="Asia/Kabul">(GMT+04:30) Kabul</option> <option value="Asia/Yekaterinburg">(GMT+05:00) Ekaterinburg</option> <option value="Asia/Tashkent">(GMT+05:00) Tashkent</option> <option value="Asia/Kolkata">(GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi</option> <option value="Asia/Katmandu">(GMT+05:45) Kathmandu</option> <option value="Asia/Dhaka">(GMT+06:00) Astana, Dhaka</option> <option value="Asia/Novosibirsk">(GMT+06:00) Novosibirsk</option> <option value="Asia/Rangoon">(GMT+06:30) Yangon (Rangoon)</option> <option value="Asia/Bangkok">(GMT+07:00) Bangkok, Hanoi, Jakarta</option> <option value="Asia/Krasnoyarsk">(GMT+07:00) Krasnoyarsk</option> <option value="Asia/Hong_Kong">(GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi</option> <option value="Asia/Irkutsk">(GMT+08:00) Irkutsk, Ulaan Bataar</option> <option value="Australia/Perth">(GMT+08:00) Perth</option> <option value="Australia/Eucla">(GMT+08:45) Eucla</option> <option value="Asia/Tokyo">(GMT+09:00) Osaka, Sapporo, Tokyo</option> <option value="Asia/Seoul">(GMT+09:00) Seoul</option> <option value="Asia/Yakutsk">(GMT+09:00) Yakutsk</option> <option value="Australia/Adelaide">(GMT+09:30) Adelaide</option> <option value="Australia/Darwin">(GMT+09:30) Darwin</option> <option value="Australia/Brisbane">(GMT+10:00) Brisbane</option> <option value="Australia/Hobart">(GMT+10:00) Hobart</option> <option value="Asia/Vladivostok">(GMT+10:00) Vladivostok</option> <option value="Australia/Lord_Howe">(GMT+10:30) Lord Howe Island</option> <option value="Etc/GMT-11">(GMT+11:00) Solomon Is., New Caledonia</option> <option value="Asia/Magadan">(GMT+11:00) Magadan</option> <option value="Pacific/Norfolk">(GMT+11:30) Norfolk Island</option> <option value="Asia/Anadyr">(GMT+12:00) Anadyr, Kamchatka</option> <option value="Pacific/Auckland">(GMT+12:00) Auckland, Wellington</option> <option value="Etc/GMT-12">(GMT+12:00) Fiji, Kamchatka, Marshall Is.</option> <option value="Pacific/Chatham">(GMT+12:45) Chatham Islands</option> <option value="Pacific/Tongatapu">(GMT+13:00) Nuku'alofa</option> <option value="Pacific/Kiritimati">(GMT+14:00) Kiritimati</option> Or just using PHP it's self $timezones = DateTimeZone::listAbbreviations(); $cities = array(); foreach( $timezones as $key => $zones ) { foreach( $zones as $id => $zone ) { /** * Only get timezones explicitely not part of "Others". * @see http://www.php.net/manual/en/timezones.others.php */ if ( preg_match( '/^(America|Antartica|Arctic|Asia|Atlantic|Europe|Indian|Pacific)\//', $zone['timezone_id'] ) && $zone['timezone_id']) { $cities[$zone['timezone_id']][] = $key; } } } // For each city, have a comma separated list of all possible timezones for that city. foreach( $cities as $key => $value ) $cities[$key] = join( ', ', $value); // Only keep one city (the first and also most important) for each set of possibilities. $cities = array_unique( $cities ); // Sort by area/city name. ksort( $cities ); It seems like the last one would be the safest as it would grow with the PHP release being used. You could also flip that array around when needed to tie timezones to city names.

    Read the article

  • Why won't this println command start a new line?

    - by David
    Here's the relevant code: public static void printBoarders (Territory x) { int t = 0 ; int n = 0 ; for (int i = 0; i<x.borders.length; i++) { if (x.borders[i] == -1) t = i ; } for (int j = 0; j<x.borders.length; j++) { if (x.borders[j] == 1) n++ ; } Territory.translate (t) ; System.out.print (" has " + n + " borders: ") ; Territory.translate (x.borders) ; System.out.println (" ") ; } When I run this, I get everything on one line without a line break. Why isn't the System.out.println (" ") ; creating a line break? Here is an example of what the output winds up being: Northwest Territory, Alberta, Kamchatka, hidavid-names-macbook-pro:~ davidname$ EDIT: the problem was that this method was never being invoked. A different one which i was replacing was. All is well.

    Read the article

  • Why is this giving me 2 different sets of timezones?

    - by chobo2
    Hi I have this line to get all the timezones Dictionary<string, TimeZoneInfo> storeZoneName = TimeZoneInfo.GetSystemTimeZones().ToDictionary(z => z.DisplayName); Now when I upload I try it on my local machine I get this (UTC-12:00) International Date Line West (UTC-11:00) Coordinated Universal Time-11 (UTC-11:00) Samoa (UTC-10:00) Hawaii (UTC-09:00) Alaska (UTC-08:00) Baja California (UTC-08:00) Pacific Time (US & Canada) (UTC-07:00) Arizona (UTC-07:00) Chihuahua, La Paz, Mazatlan (UTC-07:00) Mountain Time (US & Canada) (UTC-06:00) Central America (UTC-06:00) Central Time (US & Canada) (UTC-06:00) Guadalajara, Mexico City, Monterrey (UTC-06:00) Saskatchewan (UTC-05:00) Bogota, Lima, Quito (UTC-05:00) Eastern Time (US & Canada) (UTC-05:00) Indiana (East) (UTC-04:30) Caracas (UTC-04:00) Asuncion (UTC-04:00) Atlantic Time (Canada) (UTC-04:00) Cuiaba (UTC-04:00) Georgetown, La Paz, Manaus, San Juan (UTC-04:00) Santiago (UTC-03:30) Newfoundland (UTC-03:00) Brasilia (UTC-03:00) Buenos Aires (UTC-03:00) Cayenne, Fortaleza (UTC-03:00) Greenland (UTC-03:00) Montevideo (UTC-02:00) Coordinated Universal Time-02 (UTC-02:00) Mid-Atlantic (UTC-01:00) Azores (UTC-01:00) Cape Verde Is. (UTC) Casablanca (UTC) Coordinated Universal Time (UTC) Dublin, Edinburgh, Lisbon, London (UTC) Monrovia, Reykjavik (UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna (UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague (UTC+01:00) Brussels, Copenhagen, Madrid, Paris (UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb (UTC+01:00) West Central Africa (UTC+02:00) Amman (UTC+02:00) Athens, Bucharest, Istanbul (UTC+02:00) Beirut (UTC+02:00) Cairo (UTC+02:00) Harare, Pretoria (UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius (UTC+02:00) Jerusalem (UTC+02:00) Minsk (UTC+02:00) Windhoek (UTC+03:00) Baghdad (UTC+03:00) Kuwait, Riyadh (UTC+03:00) Moscow, St. Petersburg, Volgograd (UTC+03:00) Nairobi (UTC+03:30) Tehran (UTC+04:00) Abu Dhabi, Muscat (UTC+04:00) Baku (UTC+04:00) Port Louis (UTC+04:00) Tbilisi (UTC+04:00) Yerevan (UTC+04:30) Kabul (UTC+05:00) Ekaterinburg (UTC+05:00) Islamabad, Karachi (UTC+05:00) Tashkent (UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi (UTC+05:30) Sri Jayawardenepura (UTC+05:45) Kathmandu (UTC+06:00) Astana (UTC+06:00) Dhaka (UTC+06:00) Novosibirsk (UTC+06:30) Yangon (Rangoon) (UTC+07:00) Bangkok, Hanoi, Jakarta (UTC+07:00) Krasnoyarsk (UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi (UTC+08:00) Irkutsk (UTC+08:00) Kuala Lumpur, Singapore (UTC+08:00) Perth (UTC+08:00) Taipei (UTC+08:00) Ulaanbaatar (UTC+09:00) Osaka, Sapporo, Tokyo (UTC+09:00) Seoul (UTC+09:00) Yakutsk (UTC+09:30) Adelaide (UTC+09:30) Darwin (UTC+10:00) Brisbane (UTC+10:00) Canberra, Melbourne, Sydney (UTC+10:00) Guam, Port Moresby (UTC+10:00) Hobart (UTC+10:00) Vladivostok (UTC+11:00) Magadan, Solomon Is., New Caledonia (UTC+12:00) Auckland, Wellington (UTC+12:00) Coordinated Universal Time+12 (UTC+12:00) Fiji (UTC+12:00) Petropavlovsk-Kamchatsky (UTC+13:00) Nuku'alofa When I run it on a different local machine or my server I have this. <option value="(GMT) Casablanca">(GMT) Casablanca</option> <option value="(GMT) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London">(GMT) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London</option> <option value="(GMT) Monrovia, Reykjavik">(GMT) Monrovia, Reykjavik</option> <option value="(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna">(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna</option> <option value="(GMT+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague">(GMT+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague</option> <option value="(GMT+01:00) Brussels, Copenhagen, Madrid, Paris">(GMT+01:00) Brussels, Copenhagen, Madrid, Paris</option> <option value="(GMT+01:00) Sarajevo, Skopje, Warsaw, Zagreb">(GMT+01:00) Sarajevo, Skopje, Warsaw, Zagreb</option> <option value="(GMT+01:00) West Central Africa">(GMT+01:00) West Central Africa</option> <option value="(GMT+02:00) Amman">(GMT+02:00) Amman</option> <option value="(GMT+02:00) Athens, Bucharest, Istanbul">(GMT+02:00) Athens, Bucharest, Istanbul</option> <option value="(GMT+02:00) Beirut">(GMT+02:00) Beirut</option> <option value="(GMT+02:00) Cairo">(GMT+02:00) Cairo</option> <option value="(GMT+02:00) Harare, Pretoria">(GMT+02:00) Harare, Pretoria</option> <option value="(GMT+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius">(GMT+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius</option> <option value="(GMT+02:00) Jerusalem">(GMT+02:00) Jerusalem</option> <option value="(GMT+02:00) Minsk">(GMT+02:00) Minsk</option> <option value="(GMT+02:00) Windhoek">(GMT+02:00) Windhoek</option> <option value="(GMT+03:00) Baghdad">(GMT+03:00) Baghdad</option> <option value="(GMT+03:00) Kuwait, Riyadh">(GMT+03:00) Kuwait, Riyadh</option> <option value="(GMT+03:00) Moscow, St. Petersburg, Volgograd">(GMT+03:00) Moscow, St. Petersburg, Volgograd</option> <option value="(GMT+03:00) Nairobi">(GMT+03:00) Nairobi</option> <option value="(GMT+03:00) Tbilisi">(GMT+03:00) Tbilisi</option> <option value="(GMT+03:30) Tehran">(GMT+03:30) Tehran</option> <option value="(GMT+04:00) Abu Dhabi, Muscat">(GMT+04:00) Abu Dhabi, Muscat</option> <option value="(GMT+04:00) Baku">(GMT+04:00) Baku</option> <option value="(GMT+04:00) Port Louis">(GMT+04:00) Port Louis</option> <option value="(GMT+04:00) Yerevan">(GMT+04:00) Yerevan</option> <option value="(GMT+04:30) Kabul">(GMT+04:30) Kabul</option> <option value="(GMT+05:00) Ekaterinburg">(GMT+05:00) Ekaterinburg</option> <option value="(GMT+05:00) Islamabad, Karachi">(GMT+05:00) Islamabad, Karachi</option> <option value="(GMT+05:00) Tashkent">(GMT+05:00) Tashkent</option> <option value="(GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi">(GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi</option> <option value="(GMT+05:30) Sri Jayawardenepura">(GMT+05:30) Sri Jayawardenepura</option> <option value="(GMT+05:45) Kathmandu">(GMT+05:45) Kathmandu</option> <option value="(GMT+06:00) Almaty, Novosibirsk">(GMT+06:00) Almaty, Novosibirsk</option> <option value="(GMT+06:00) Astana, Dhaka">(GMT+06:00) Astana, Dhaka</option> <option value="(GMT+06:30) Yangon (Rangoon)">(GMT+06:30) Yangon (Rangoon)</option> <option value="(GMT+07:00) Bangkok, Hanoi, Jakarta">(GMT+07:00) Bangkok, Hanoi, Jakarta</option> <option value="(GMT+07:00) Krasnoyarsk">(GMT+07:00) Krasnoyarsk</option> <option value="(GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi">(GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi</option> <option value="(GMT+08:00) Irkutsk, Ulaan Bataar">(GMT+08:00) Irkutsk, Ulaan Bataar</option> <option value="(GMT+08:00) Kuala Lumpur, Singapore">(GMT+08:00) Kuala Lumpur, Singapore</option> <option value="(GMT+08:00) Perth">(GMT+08:00) Perth</option> <option value="(GMT+08:00) Taipei">(GMT+08:00) Taipei</option> <option value="(GMT+09:00) Osaka, Sapporo, Tokyo">(GMT+09:00) Osaka, Sapporo, Tokyo</option> <option value="(GMT+09:00) Seoul">(GMT+09:00) Seoul</option> <option value="(GMT+09:00) Yakutsk">(GMT+09:00) Yakutsk</option> <option value="(GMT+09:30) Adelaide">(GMT+09:30) Adelaide</option> <option value="(GMT+09:30) Darwin">(GMT+09:30) Darwin</option> <option value="(GMT+10:00) Brisbane">(GMT+10:00) Brisbane</option> <option value="(GMT+10:00) Canberra, Melbourne, Sydney">(GMT+10:00) Canberra, Melbourne, Sydney</option> <option value="(GMT+10:00) Guam, Port Moresby">(GMT+10:00) Guam, Port Moresby</option> <option value="(GMT+10:00) Hobart">(GMT+10:00) Hobart</option> <option value="(GMT+10:00) Vladivostok">(GMT+10:00) Vladivostok</option> <option value="(GMT+11:00) Magadan, Solomon Is., New Caledonia">(GMT+11:00) Magadan, Solomon Is., New Caledonia</option> <option value="(GMT+12:00) Auckland, Wellington">(GMT+12:00) Auckland, Wellington</option> <option value="(GMT+12:00) Fiji, Kamchatka, Marshall Is.">(GMT+12:00) Fiji, Kamchatka, Marshall Is.</option> <option value="(GMT+13:00) Nuku'alofa">(GMT+13:00) Nuku'alofa</option> <option value="(GMT-01:00) Azores">(GMT-01:00) Azores</option> <option value="(GMT-01:00) Cape Verde Is.">(GMT-01:00) Cape Verde Is.</option> <option value="(GMT-02:00) Mid-Atlantic">(GMT-02:00) Mid-Atlantic</option> <option value="(GMT-03:00) Brasilia">(GMT-03:00) Brasilia</option> <option value="(GMT-03:00) Buenos Aires">(GMT-03:00) Buenos Aires</option> <option value="(GMT-03:00) Georgetown">(GMT-03:00) Georgetown</option> <option value="(GMT-03:00) Greenland">(GMT-03:00) Greenland</option> <option value="(GMT-03:00) Montevideo">(GMT-03:00) Montevideo</option> <option value="(GMT-03:30) Newfoundland">(GMT-03:30) Newfoundland</option> <option value="(GMT-04:00) Atlantic Time (Canada)">(GMT-04:00) Atlantic Time (Canada)</option> <option value="(GMT-04:00) La Paz">(GMT-04:00) La Paz</option> <option value="(GMT-04:00) Manaus">(GMT-04:00) Manaus</option> <option value="(GMT-04:00) Santiago">(GMT-04:00) Santiago</option> <option value="(GMT-04:30) Caracas">(GMT-04:30) Caracas</option> <option value="(GMT-05:00) Bogota, Lima, Quito, Rio Branco">(GMT-05:00) Bogota, Lima, Quito, Rio Branco</option> <option value="(GMT-05:00) Eastern Time (US &amp; Canada)">(GMT-05:00) Eastern Time (US &amp; Canada)</option> <option value="(GMT-05:00) Indiana (East)">(GMT-05:00) Indiana (East)</option> <option value="(GMT-06:00) Central America">(GMT-06:00) Central America</option> <option value="(GMT-06:00) Central Time (US &amp; Canada)">(GMT-06:00) Central Time (US &amp; Canada)</option> <option value="(GMT-06:00) Guadalajara, Mexico City, Monterrey">(GMT-06:00) Guadalajara, Mexico City, Monterrey</option> <option value="(GMT-06:00) Saskatchewan">(GMT-06:00) Saskatchewan</option> <option value="(GMT-07:00) Arizona">(GMT-07:00) Arizona</option> <option value="(GMT-07:00) Chihuahua, La Paz, Mazatlan">(GMT-07:00) Chihuahua, La Paz, Mazatlan</option> <option value="(GMT-07:00) Mountain Time (US &amp; Canada)">(GMT-07:00) Mountain Time (US &amp; Canada)</option> <option value="(GMT-08:00) Pacific Time (US &amp; Canada)">(GMT-08:00) Pacific Time (US &amp; Canada)</option> <option value="(GMT-08:00) Tijuana, Baja California">(GMT-08:00) Tijuana, Baja California</option> <option value="(GMT-09:00) Alaska">(GMT-09:00) Alaska</option> <option value="(GMT-10:00) Hawaii">(GMT-10:00) Hawaii</option> <option value="(GMT-11:00) Midway Island, Samoa">(GMT-11:00) Midway Island, Samoa</option> <option value="(GMT-12:00) International Date Line West">(GMT-12:00) International Date Line West</option> They are different. Same line of code but one is GMT and one is UTC. How can I force it to be always the same? Also I want to have a default choice of "UTC" but I am not sure what the diff is between this (UTC-11:00) Coordinated Universal Time-11 and this (UTC-02:00) Coordinated Universal Time-02

    Read the article

1