Search Results

Search found 835 results on 34 pages for 'utc'.

Page 11/34 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • return nil for dateFromString call of NSDateFormatter

    - by tw
    I am getting nil returned for the date variable in the below code. I can't find any problem with the date format, can anyone help? NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; [formatter setDateFormat:@"EEE MMM dd HH:mm:ss zzz yyyy"]; NSString *dateString = [[NSString alloc] initWithFormat:@"%@", @"Mon Apr 05 04:37:28 UTC 2010"]; NSDate *date = [formatter dateFromString:dateString];

    Read the article

  • Changing timezone in MSYS

    - by d9k
    Hello, how can I change timezone on MSYS+MinGW for Windows if I have only "date" command installed? There are no "tzconfig" or "tzselect" here. When I try $date --set="Apr 01 23:08 UTC+04:00" I receive 19:08 GMT+0 resul. This is very important for me because "make" command always gives me errors about files modified in future.

    Read the article

  • Ubuntu 13.10 Symfony installation date time issue

    - by Sambo
    I'm installing Symfony on my Ubuntu system, everything was going fine until the very last moment when I was met with a screen that said: ContextErrorException: Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /var/www/symfony-test/app/cache/dev/classes.php line 5107 in /var/www/symfony-test/app/cache/dev/classes.php line 5107 at ErrorHandler->handle('2', 'date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.', '/var/www/symfony-test/app/cache/dev/classes.php', '5107', array('level' => '100', 'message' => 'Notified event "kernel.exception" to listener "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelException".', 'context' => array())) at date_default_timezone_get() in /var/www/symfony-test/app/cache/dev/classes.php line 5107 at Logger->addRecord('100', 'Notified event "kernel.exception" to listener "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelException".', array()) in /var/www/symfony-test/app/cache/dev/classes.php line 5193 at Logger->debug('Notified event "kernel.exception" to listener "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelException".') in /var/www/symfony-test/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php line 246 at TraceableEventDispatcher->preListenerCall('kernel.exception', array(object(ProfilerListener), 'onKernelException')) in /var/www/symfony-test/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php line 448 at TraceableEventDispatcher->Symfony\Component\HttpKernel\Debug\{closure}(object(GetResponseForExceptionEvent)) at call_user_func(object(Closure), object(GetResponseForExceptionEvent)) in /var/www/symfony-test/app/cache/dev/classes.php line 1667 at EventDispatcher->doDispatch(array(object(Closure), object(Closure)), 'kernel.exception', object(GetResponseForExceptionEvent)) in /var/www/symfony-test/app/cache/dev/classes.php line 1600 at EventDispatcher->dispatch('kernel.exception', object(GetResponseForExceptionEvent)) in /var/www/symfony-test/app/cache/dev/classes.php line 1764 at ContainerAwareEventDispatcher->dispatch('kernel.exception', object(GetResponseForExceptionEvent)) in /var/www/symfony-test/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php line 139 at TraceableEventDispatcher->dispatch('kernel.exception', object(GetResponseForExceptionEvent)) in /var/www/symfony-test/app/bootstrap.php.cache line 2870 at HttpKernel->handleException(object(ContextErrorException), object(Request), '1') in /var/www/symfony-test/app/bootstrap.php.cache line 2823 at HttpKernel->handle(object(Request), '1', true) in /var/www/symfony-test/app/bootstrap.php.cache line 2947 at ContainerAwareHttpKernel->handle(object(Request), '1', true) in /var/www/symfony-test/app/bootstrap.php.cache line 2249 at Kernel->handle(object(Request)) in /var/www/symfony-test/web/app_dev.php line 28 After many hours of trying ideas in other threads, editing php.ini and classes.php to something that might work, I have gotten absolutely nowhere! Has anyone else had this problem

    Read the article

  • Daylight saving time and Timezone best practices

    - by Oded
    I am hoping to make this question and the answers to it the definitive guide to dealing with daylight saving time, in particular for dealing with the actual change overs. If you have anything to add, please do Many systems are dependent on keeping accurate time, the problem is with changes to time due to daylight savings - moving the clock forward or backwards. For instance, one has business rules in an order taking system that depend on the time of the order - if the clock changes, the rules might not be as clear. How should the time of the order be persisted? There is of course an endless number of scenarios - this one is simply an illustrative one. How have you dealt with the daylight saving issue? What assumptions are part of your solution? (looking for context here) As important, if not more so: What did you try that did not work? Why did it not work? I would be interested in programming, OS, data persistence and other pertinent aspects of the issue. General answers are great, but I would also like to see details especially if they are only available on one platform. Summary of answers and other data: (please add yours) Do: Always persist time according to a unified standard that is not affected by daylight savings. GMT and UTC have been mentioned by different people. Include the local time offset (including DST offset) in stored timestamps. Remember that DST offsets are not always an integer number of hours (e.g. Indian Standard Time is UTC+05:30). If using Java, use JodaTime. - http://joda-time.sourceforge.net/ Create a table TZOffsets with three columns: RegionClassId, StartDateTime, and OffsetMinutes (int, in minutes). See answer Check if your DBMS needs to be shutdown during transition. Business rules should always work on civil time. Internally, keep timestamps in something like civil-time-seconds-from-epoch. See answer Only convert to local times at the last possible moment. Don't: Do not use javascript date and time calculations in web apps unless you ABSOLUTELY have to. Testing: When testing make sure you test countries in the Western and Eastern hemispheres, with both DST in progress and not and a country that does not use DST (6 in total). Reference: Olson database, aka Tz_database - ftp://elsie.nci.nih.gov/pub Sources for Time Zone and DST - http://www.twinsun.com/tz/tz-link.htm ISO format (ISO 8601) - http://en.wikipedia.org/wiki/ISO_8601 Mapping between Olson database and Windows TimeZone Ids, from the Unicode Consortium - http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/windows_tzid.html TimeZone page on WikiPedia - http://en.wikipedia.org/wiki/Tz_database StackOverflow questions tagged dst - http://stackoverflow.com/questions/tagged/dst StackOverflow questions tagged timezone - http://stackoverflow.com/questions/tagged/timezone Other: Lobby your representative to end the abomination that is DST. We can always hope...

    Read the article

  • Parsing RFC 2822 date in JAVA

    - by DutrowLLC
    I need to parse an RFC 2822 string representation of a date in Java. An example string is here: Sat, 13 Mar 2010 11:29:05 -0800 It looks pretty nasty so I wanted to make sure I was doing everything right and would run into weird problems later with the date being interpreted wrong either through AM-PM/Military time problems, UTC time problems, problems I don't anticipate, etc... Thanks!

    Read the article

  • how to set mysql2 timezone option to remove query warning

    - by user347765
    I always get warning when use mysql2 do query /usr/local/lib/ruby/gems/1.9.1/gems/mysql2-0.2.6/lib/active_record/connection_adapters/mysql2_adapter.rb:463: warning: :database_timezone option must be :utc or :local - defaulting to :local I did see a option for Timezones Mysql2 now supports two timezone options: :database_timezone - this is the timezone Mysql2 will assume fields are already stored as, and will use this when creating the initial Time objects in ruby :application_timezone - this is the timezone Mysql2 will convert to before finally handing back to the caller did any one know, how to usage, and where to set this option? Thanks.

    Read the article

  • Drupal timezone information

    - by Sebastian Hoitz
    In my drupal installation I can get the offset from UTC in seconds to the timezone I specified in the admin panel using variable_get('date_default_timezone', 0) However, now that we have daylight-saving-time, the time I get is always off by one hour. Is there a way to retrieve the actual timezone string from Drupal, as "Europe/Berlin" for example? The reason is, that I have to use this with Zend Framework's Zend_Date, but Drupal does not set the PHP default timezone, as echo date_default_timezone_get(); gives me System/Localtime.

    Read the article

  • Display DateTime in GridView using user's time

    - by Rachel Martin
    I have a DateTime stored in UTC time that I'd like to display to the user in their local time from within a GridView control. How can I convert my DateTime to the user's time (not my server's local time)? Here is my current field as it appears in the GridView Columns collection: <asp:BoundField DataField="RunTime" HeaderText="Run Time" SortExpression="RunTime" DataFormatString="{0:f}" />

    Read the article

  • Formatting Timestamps in Java

    - by Craig H
    Is there a way to format a UTC time into any arbitrary string format I want in java? Basically I was thinking of having some class take the timestamp and I pass it is string telling it how I want it formated, and it returns the formatted string for me. Is there a way to do this?

    Read the article

  • error loading (TypeLoadException) on asp.net/xsp/mono on debian/opensuse

    - by acidzombie24
    When i reset apache and load my website i get the first error below. I have no idea what the problem is. If i reload the page again (without restarting apache) i get the 2nd error, probably because the first error occurred and BaseUser is the first class/func that Application_Start uses. Why am i getting this load exception? Whats messed up is i tried using mono's VMWare img to debug it and i got the very same exception (until i restarted which now refuses to give me anything but 404 errors). However when i use mono develop to run the project the site runs PERFECT. WTF. Any ideas? Server Error in '/' Application A type load exception has occurred. Description: HTTP 500. Error processing request. Stack Trace: System.TypeLoadException: A type load exception has occurred. at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod*,object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 Version information: Mono Runtime Version: 2.8.1 (tarball Mon Dec 27 10:20:03 UTC 2010); ASP.NET Version: 2.0.50727.1433 Second: Server Error in '/' Application Could not load type 'mynamespace.BaseUser' from assembly 'mynamespace, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Description: HTTP 500. Error processing request. Stack Trace: System.TypeLoadException: Could not load type 'mynamespace.BaseUser' from assembly 'mynamespace, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. at mynamespace.Global.Application_Start (System.Object sender, System.EventArgs e) [0x00000] in <filename unknown>:0 at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod*,object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 Version information: Mono Runtime Version: 2.8.1 (tarball Mon Dec 27 10:20:03 UTC 2010); ASP.NET Version: 2.0.50727.1433 -edit- i'll mention that i tried MonoDevelops build of my site on both opensuse and my website and i get the exact same problem.

    Read the article

  • Can I use a single DateTime field on the Entity Framework model side when the value is stored in a set of Int fields in the actual database?

    - by Ivan
    The actual table in the database has separate integer fields for storing year, month, day, hour and minute values (all in UTC) (seconds and milliseconds are irrelevant for my task and considered equal to zero). Needless to say it would be of great convenience to have just one field of DateTime type on the application side and hide all the conversion under the cover of the Entity Framework model code. Any directions on how to do that? I am not very experienced with Entity Framework yet.

    Read the article

  • Fatal IO error 0 (Success) on X server

    - by Ori Pessach
    What does the error "Fatal IO error 0 (Success) on X server" mean? The error is produced when an X client tries to call XvCreateImage(), and it results in the client terminating. X.0.log shows the following version information: X.Org X Server 1.6.4 Release Date: 2009-9-27 X Protocol Version 11, Revision 0 Build Operating System: Linux 2.6.24-23-server i686 Ubuntu Current Operating System: Linux ori-laptop 2.6.31-17-generic #54-Ubuntu SMP Thu Dec 10 16:20:31 UTC 2009 i686 Kernel command line: BOOT_IMAGE=/boot/vmlinuz-2.6.31-17-generic root=UUID=df637de9-47ed-4453-9393-67e2e2ffaa2f ro quiet splas

    Read the article

  • How do I aggregate activerecord model data for a specific time period?

    - by gsiener
    I'm collecting data from a system every ~10s (this time difference varies due to communication time with networked devices). I'd like to calculate averages and sums of the stored values for this activerecord model on a daily basis. All records are stored in UTC. What's the correct way to sum and average values for, e.g., the previous day from midnight to midnight EST? I can do this in sql but don't know the "rails way" to make this calculation.

    Read the article

  • Set creation and update time with Hibernate in Xml mappings

    - by Marco
    Hi, I'm using Hibernate with Xml mappings. I have an entity that has two fields creationDate and updateDate of type timestamp, that have to be filled with the current UTC time when the entity is persisted and updated. I know about the existence of the @PrePersist and @PreUpdate annotations, but i don't know how to use their equivalent in my Xml mappings. Again, i was wondering if Hibernate somehow supports natively the update and creation time set. Thanks

    Read the article

  • AngularJS service returning promise unit test gives error No more request expected

    - by softweave
    I want to test a service (Bar) that invokes another service (Foo) and returns a promise. The test is currently failing with this error: Error: Unexpected request: GET foo.json No more request expected Here are the service definitions: // Foo service returns new objects having get function returning a promise angular.module('foo', []). factory('Foo', ['$http', function ($http) { function FooFactory(config) { var Foo = function (config) { angular.extend(this, config); }; Foo.prototype = { get: function (url, params, successFn, errorFn) { successFn = successFn || function (response) {}; errorFn = errorFn || function (response) {}; return $http.get(url, {}).then(successFn, errorFn); } }; return new Foo(config); }; return FooFactory; }]); // Bar service uses Foo service angular.module('bar', ['foo']). factory('Bar', ['Foo', function (Foo) { var foo = Foo(); return { getCurrentTime: function () { return foo.get('foo.json', {}, function (response) { return Date.parse(response.data.now); }); } }; }]); Here is my current test: 'use strict'; describe('bar tests', function () { var currentTime, currentTimeInMs, $q, $rootScope, mockFoo, mockFooFactory, Foo, Bar, now; currentTime = "March 26, 2014 13:10 UTC"; currentTimeInMs = Date.parse(currentTime); beforeEach(function () { // stub out enough of Foo to satisfy Bar service: // create mock object with function get: function(url, params, successFn, errorFn) // that promises to return a response with this property // { data: { now: "March 26, 2014 13:10 UTC" }}) mockFoo = { get: function (url, params, successFn, errorFn) { successFn = successFn || function (response) {}; errorFn = errorFn || function (response) {}; // setup deferred promise var deferred = $q.defer(); deferred.resolve({data: { now: currentTime }}); return (deferred.promise).then(successFn, errorFn); } }; // create mock Foo service mockFooFactory = function(config) { return mockFoo; }; module(function ($provide) { $provide.value('Foo', mockFooFactory); }); module('bar'); inject(function (_$q_, _$rootScope_, _Foo_, _Bar_) { $q = _$q_; $rootScope = _$rootScope_; Foo = _Foo_; Bar = _Bar_; }); }); it('getCurrentTime should return currentTimeInMs', function () { Bar.getCurrentTime().then(function (serverCurrentTime) { now = serverCurrentTime; }); $rootScope.$apply(); // resolve Bar promise expect(now).toEqual(currentTimeInMs); }); }); The error is being thrown at $rootScope.$apply(). I also tried using $rootScope.$digest(), but it gives the same error. Thanks in advance for any insight you can give me.

    Read the article

  • Using client time to calculate timezone

    - by Mike TK
    Hi Folks, Instead of asking a client timezone in registration form (to correctly format datetime, all server dates in UTC) I thought about fetching a time from client computer and calculating time offset between client and server. Anyone tried this? How often clients have something insane on their system clocks? Cheers!

    Read the article

  • Countdown timer using jquery or google app engine ?

    - by john
    hi everybody, I need to do a countdown clock, that counts down the days, hours, minutes and seconds that are left to a date of my choice,Using jquery or google app engine(Python). I created a timer using Javascript,But in that i used system time. I need to use server time.Can any body give me ideas to build up a count down Timer using server UTC time.

    Read the article

  • How can I change timezone in Wordpress 2.9.2?

    - by newbie
    I have changed timezone from General Settings, but that had no effect, time still shows as default UTC time zone. Then I changed timezone in wp-settings.php with date_default_timezone_set('Europe/Helsinki'); but that din't work either. What could be wrong with my settings and why isn't timezone changing?

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >