Date() - Buggy behaviour working with Number() or uint()

It took me half day to track down this, apparently it is a bug (I don't know if there is some obscure logic behind it).
Date() behaves much differently when casted/created with the same amount as Number() or uint()
Here is the output when tracing:
new Date()
=
Wed Jun 13 20:12:43 GMT+0200 2012
new Date().time
=
1339611163266
Number(new Date())
=
1339611163266
uint(new Date())
=
3876334210
new Date(Number(1339610984911))
=
Wed Jun 13 20:09:44 GMT+0200 2012
new Date(uint(1339610984911))
=
Sat Feb 14 21:42:35 GMT+0100 1970
As you can see, converting a date to Number(new Date()) or uint(new Date()) gives a completely different result.
Also, working with the same time amount, if new Date(Number(time)) or new Date(uint(time)) returns a completely different date.
So, even though milliseconds from 1st jan 1970 are obviously an integer, AS3 treats it differently if casted to Number or uint.
Is there a logic? To me it looks like a bug...
namaste
Filippo

If you look up the different numeric classes you will see how they differ in their limits.  One problem you will probably run into someday ( I have a couple times) is when you use a uint as a counter in a loop that is counting backwards... when it should reach a -1, which it cannot do, it jumps to 4294967295, leaving you scratching your head wondering why the loop never ended or some other out of range error occurs.

Similar Messages

  • Working with NUMBER types in ASP

    Hi,
    We are having big problems working with Oracle from a ASP application. We return data from the Oracle (8i) database using Oracle ODBC driver (9.2). However, whenever Oracle returns NUMBER columns (Number(8)), we cannot work with them in ASP because of an ASP VBScript bug that prevents adNumeric from working withouut explicitly casting to numbers (see
    http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q195/1/80.ASP&NoWebContent=1&NoWebContent=1 for more info).
    I was wondering if there is any other way to get round this in ORacle - can I set somethign in the ODBC driver that instead of returning the data as adNumeric, it returns it as some other number type that wont exhibit this problem?
    Thanks in advance!

    Anyone :-(

  • Buffer table not up-to-date error while working with local SRM PO

    Hi all,
    We are working in SRM 7.0  with extended classic scenario.
    I faced an issue while working with local SRM PO. Iam getting a dump while doing changes in SRM PO.
    Dump says that "Buffer table not up-to-date". Please find the detail dump error below :
    http://cscgsapndc34.nwk.amer.csc.com:8114/sap/bc/webdynpro/sapsrm/wda_l_fpm_oif/
    UNCAUGHT_EXCEPTION
    Buffer table not up-to-date
    Function: BBP_PD_ABORT of program SAPLBBP_PDH
    Form: ABORT of program SAPLBBP_PDACC
    Form: ACCOUNT_INTERNAL_SAVE of program SAPLBBP_PDACC
    Function: BBP_ACCOUNT_INTERNAL_SAVE of program SAPLBBP_PDACC
    Form: PROCDOC_INTERNAL_SAVE of program SAPLBBP_PD
    Form: STATUS_SET_AND_INTERNAL_SAVE of program SAPLBBP_PD
    Form: PROCDOC_UPDATE of program SAPLBBP_PD
    Function: BBP_PROCDOC_UPDATE of program SAPLBBP_PD
    Method: /SAPSRM/IF_PDO_UPDATE_BUFFER~SUBMIT of program /SAPSRM/CL_PDO_UPDATE_BUFF_PO=CP
    Method: /SAPSRM/IF_PDO_BASE~SUBMIT_UPDATE of program /SAPSRM/CL_PDO_BASE===========CP
    http://cscgsapndc34.nwk.amer.csc.com:8114/sap/bc/webdynpro/sapsrm/wda_l_fpm_oif/
    If anyone of you already came across this type of dump error can you please let me know what might be the possible reasons for the same .  Request your kind help in this regard.
    Thanks in advance.
    Regards,
    Kalyani

    There could be many issues..
    or some data issue.
    can you recreate the same issue you can fix it.
    it could only one incident so you should thoroghly check what piece of data is wrong.
    what actions are you doing in the purchase order.
    Note 1580496 - Purchase order Buffer table not upto date dump in change ver
    Symptom
    1.Create a change version on any Purchase order.
    2. Edit quantity of any item
    3. Dont press 'Enter key'
    4. Clickk on Order button.
    Application gves dump 'Buffer table not upto date'
    but it is very difficult to say what is the issue. request your technical resource to look your dump.
    if you recreate the issue half of the problem resolved.

  • Why date format dosent work with adobe reader?

    Hei,
    I have a pdf form I have done with adobe pro. I have one textbox where comes date and I formating it date. It work fine with adobe pro but when I convert it to:
    Copy As - Reader Extended PDF - Enable Additional Features...
    it wont work... It allows to write everything to this textbox.
    I need all those extention to my customer, but still I would like to that this date textbox could be written only date format (exemple 12.12.1212).
    Can somebody help me and tell how can I put it work whit my extended PDF?
    Thank you for your help?

    Hello,
    I cannot tell what are the exact differencies between the version. But I can tell you should always use (at least try to use the newest Reader). I guess you´re not the only developer on Forms, so there are possibly more people depending on the version of the client browser/ Reader. There is a solution for this problem, which does not ask anything from you, only the user.
    You can easily test the Reader version through JS coding and act based on the result. I use this like this "if your Reader is lower than 8.1" then "message popup = We are sorry, your Reader is too old, this form won´t work for you. Please upgrade first.". It takes like 5 minutes (10 for lame users at max) to update his Reader.
    Maybe you should this about such a test, if the user passes the test, his application won´t have any problem, if not there is no guarantee. And YOU have no problem, nobody tells you "hey sir, your form is not working, I´m not gonna pay you".
    Otto

  • IPhoto change time and date does not work with Flickr

    Hello everyone,
    In my iPhoto librairies, I do change my photo date and time to set them we they were actually taken. Here, I'm refering especially to photos which are:
    * scanned photo
    * stiched photo
    The issue is:
    When I share these photo on Flickr, Flickr sort them with the previous date time setting, even if I have selected to change the original file in iPhoto.
    So it is painful to end up seeing that all the work done on iPhoto is not reflected elsewhere.
    This issue can only be in iPhoto as the old date time should be swapped with the new one.
    Let me know when the fixed will be implemented so I stop loosing precious time editing photos!
    Regards,
    Francois

    I have an Access Database created with Access 2010 installed on a machine running Windows 8 using the Access 2010 Runtime code. For the most part the database works but all reports that require a date in the header come out with ##error. Works fine
    with full access on any other machine. Just this one were we are using Runtime. Any ideas?
    Make sure you don't have Date used as a Field Name, as it is a Reserved Word in Access and can cause unpredictable behavior.
    Also make sure you have compiled the VBA code, before using the Runtime version.
    Have error handling in place, to capture errors in your DB.
    Hope these pointers help,
    Daniel van den Berg | Washington, USA | "Anticipate the difficult by managing the easy"
    Please vote an answer helpful if they helped. Please mark an answer(s) as an answer when your question is being answered.

  • Keyboard IMac doesnt work with number key

    **** I have an Imac intel core  duo at 2,8GHZ with OSX 10.8.2 and I have an USB apple keyboard  with the number on it , the problem is that I c ant use the number on the right of the keyboard, i try the keyboard on an other computer and the number work, so the problem come from my system?????
    Exuse my french but  I m frenc
    thank s to help me
    Fred

    Maybe your Numpad is set to mouse keys? There is a function to use the Numpad as mouse replacement. You can turn this off and on in System perferences -> Universal Access -> Mouse & Trackpad.

  • Powerpivot Data Refresh Not working with Oracle Data Source in sharePoint 2013

    I am using SQL Server 2012 PowerPivot for Excel 2010. Getting the following error in SharePoint 2013 environment, when using Oracle data source within a workbook -
    EXCEPTION: Microsoft.AnalysisServices.SPAddin.DataRefreshException: Engine error during processing of OLE DB or ODBC error: The specified module could not be found..:
    <Site\PPIV workbook>---> Microsoft.AnalysisServices.SPAddin.DataRefreshException: OLE DB or ODBC error:
    The specified module could not be found..   
     at Microsoft.AnalysisServices.SPAddin.DataRefresh.ASEngineInstance.ProcessDataSource(String server, String databaseName, String datasourceName, SecureStoreCredentialsWrapper
    runAsCredentials, SecureStoreCredentialsWrapper specificConfigurationCredentials, DataRefreshService dataRefreshService, String fileUrlForTracing)     -
    -- End of inner exception stack trace ---   
     at Microsoft.AnalysisServices.SPAddin.DataRefresh.ASEngineInstance.ProcessDataSource(String server, String databaseName, String datasourceName, SecureStoreCredentialsWrapper
    runAsCredentials, SecureStoreCredentialsWrapper specificConfigurationCredentials, DataRefreshService dataRefreshService, String fileUrlForTracing)   
     at Microsoft.AnalysisServices.SPAddin.DataRefresh.DataRefreshService.ProcessingJob(Object parameters)
    I created a simple Excel 2013 PPIV workbook with an oracle data source and uploaded that to SharePoint 2013, but no change in the results - still getting the above error.
    What is this error? We have installed Oracle client (64-bit, since we use 64-bit Excel and Sp is also 64-bit) on SSAS PPIV Server and SharePoint Content DB Server. Do we need
    to install it anywhere else?
    Thanks,
    Sonal

    Hi Sonal,
    To use PowerPivot for SharePoint on SharePoint 2013, it is required to install PowerPivot for SharePoint with the Slipstream version of SQL Server 2012 SP1. If you install SQL Server 2012 and then use the upgrade version of SQL Server 2012 SP1 to upgrade,
    the environment will not support SharePoint 2013.
    I would suggest you refer to the following articles:
    Install SQL Server BI Features with SharePoint 2013 (SQL Server 2012 SP1):
    http://technet.microsoft.com/en-us/library/jj218795.aspx
    Upgrade SQL Server BI Features to SQL Server 2012 SP1:
    http://technet.microsoft.com/en-us/library/jj870987.aspx
    Regards,
    Elvis Long
    TechNet Community Support

  • BUG: Ctrl+Alt+ number to switch modules only works with number pad

    Really annoying, since this worked nicely in the beta. If, for example, you hold down Ctrl+Alt+1 (pressing 1 on the top row of the keyboard) to switch to the Library Module, it doesn't work. If you use 1 on the numeric keypad, it works fine. What's the big deal, you ask? Well, try using the number pad on a laptop - you either get to use the number keys or the regular keys, so this shortcut is essentially useless on anything other than a full-size keyboard.

    Windows treats Ctrl + Alt shortcuts as special. They are used as hotkeys for desktop icons, and if a key is used for that purpose, it overrides any use within a program. I did a little research, and setting a desktop hotkey to 3 will cause your LR symptoms, where you can't used the normal numbers and have to use the keypad to switch modules. On the other hand, you'd probably be seeing the effect of using the non-number-pad keys (they'd launch a program), so it's a mystery.
    In my testing, I noticed that the Firefox browser uses that key combination to switch between its tabbed sessions. If you're running that program, you could test to see if it exhibits the same symptoms.
    Hal

  • Hibernate data insertion not working with oracle auto increment

    hi i have created a table and the id is set to auto increment by a sequence trigger pair
    when i manually giving value to id its working fine
    but when i tried without maually giving the id i am getting this error
    org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save(): com.pojo.Example
    at org.hibernate.id.Assigned.generate(Assigned.java:33)
    at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:99)
    at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:187)
    at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33)
    at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:172)
    at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27)
    at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
    at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:535)
    at org.hibernate.impl.SessionImpl.save(SessionImpl.java:523)
    at org.hibernate.impl.SessionImpl.save(SessionImpl.java:519)
    at hibernetsample.Main.main(Main.java:30)

    >
    hi i have created a table and the id is set to auto increment by a sequence trigger pair
    when i manually giving value to id its working fine
    but when i tried without maually giving the id i am getting this error
    org.hibernate.id.Assigned
    >
    That is because you are using the hibernate 'assigned' generator which, by definition
    >
    lets the application to assign an identifier to the object before save() is called.
    This is the default strategy if no <generator> element is specified.
    >
    For your use case you can use the 'sequence' generator.
    The valid generator options and one way to use a sequence generator is shown in this article
    http://www.hibernate-training-guide.com/identifiers-generators.html
    The hibernate section of this article also uses a trigger with sequence generator
    http://blog.lishman.com/2009/02/auto-generated-primary-keys-in-oracle.html
    You should check the hibernate documention and tutorial for examples or search 'hibernate generator sequence example'

  • New phone - iMessage and Facetime not working with number?

    I had a 4s and recently got a 5s, and now iMessage on my Mac only has my email as an option. My phone number is the same. I searched around for a solution, and one involved signing out and back into both iMessage and Facetime on my Mac, so I did, and now Facetime has the same problem. I really do not want to log into my Apple ID in iMessages on my phone because I tried that a few days ago and had all kinds of problems with sending and receiving messages. Currently, my phone is sending and receiving with my phone number, which is checked but also grayed out in Settings. I am running OS X 10.8.3. Any help would be appreciated! Thanks!

    It sounds like you did the first part of the following. Thus it seems yo have to try the second parts evenought you do not want o signout on the iPhone
    Phone number missing on OS X
    If your phone number isn't listed on your Mac, follow these steps:
    Update to the latest version of OS X on your Mac.
    Verify that you're using the same Apple ID that you're using on your iPhone.
    Sign out of your Apple ID at these locations on your Mac:
    Messages > Preferences > Accounts tab. Click iMessage in the left column, then click Sign Out.
    FaceTime > Preferences. Select your Apple ID, then click Sign Out.
    Close FaceTime and Messages on your Mac.
    Open FaceTime and Messages, then sign in to your Apple ID in Preferences.
    If your phone number still isn't listed on your Mac, follow these steps:
    Sign out of your Apple ID on all iOS devices, including your iPhone, in the following locations:
    Settings > Messages > Send & Receive. Tap your Apple ID, then tap Sign Out.
    Settings > FaceTime. Tap your Apple ID, then tap Sign Out.
    Sign out of your Apple ID on your Mac at the following locations:
    Messages > Preferences > Accounts tab. Click iMessage in the left column, then click Sign Out.
    FaceTime > Preferences. Select your Apple ID, then click Sign Out.
    Close FaceTime and Messages on your Mac.
    Sign in to your Apple ID on your iPhone.
    When activation is complete, your Apple ID and all verified email addresses should be visible in Settings > Messages > Send & Receive and also in Settings > FaceTime.
    Open FaceTime and iMessage, then sign in to your Apple ID in Preferences.
    iOS and OS X: Link your phone number and Apple ID for use with FaceTime and iMessage

  • Quick Step Keyboard Shortcuts Work With Number Keys Above Keyboard, But Not On Keypad

    Had this same issue with Outlook 2013:
    "I assigned hotkeys to several Quick Steps, and used the suggested convention of Ctrl + Shift +1, Ctrl + Shift + 2... through 5.
    When I use the number keys above my QWERTY keys, all is well.
    When I use the keys on my keypad, Outlook does funny things like collapsing all the day's e-mails into the "Today" heading."
    Correct. The keypad values do different things and you can't substitute the keys - you need to use the row numbers with the QAT."
    Ergonomically, the number keys on the numpad are far superior to the ones above the keyboard for processing email quickly and easily (and without carpel tunnel!). I'm right-handed so it's much more natural for me to hold down the same two control keys (alt-shift)
    with my left hand and select the action (a different key every time) I want with my right. Can do it opposite, but requires more conscious thought and is more subject to error (which defeats the whole purpose when I have to go fish a mis-acted on email out
    of the wrong folder).
    Was wondering if this issue had been corrected in 2013 (or there was an easy workaround that doesn't involve writing and maintaining a separate macro or installing/maintaining a separate program like AutoHotKeys). The built-in functionality is 99% what I need,
    but the ergonomic issue may make it unusable for me.

    Hi,
    I can confirm in Outlook 2013 the shortcut keys can only use the number keys above "QWERTY..." and we can't use the number keys on the keypad. This comes by design and is not changeable currently.
    Thank you for focusing on our product, since I can do few on this issue, you can submit your feedback about this request from this link below, Microsoft treasures users voice:
    http://office.microsoft.com/en-US/suggestions.aspx
    Regards,
    Melon Chen
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Upgrade to BI7 - Master data report not working with attributes

    Hi
    We've recently upgraded to BI7. We've noticed that any queries where a characteristic is the info provider, reporting on the attributes as free characteristics is not possible. The only way to fix this is to make the characteristics navigational. Is there a fix for this, or do we have to make all the characteristics navigational? It used to work in 3.1

    Hi Expert,
    We are starting upgradation, Can you please prvide guide me how to do the upgradation.
    Thanks

  • Does Oracle Data Masking pack work with MS SQL Server?

    And if so, are other OEM packs required (i.e. MS SQL Server system monitoring plug-in)?
    TIA

    Hi Martin.
    I try to resolve this problem ( sqlserver masking) but I can't found the OBE mentioned.
    You or anyone have examples about masking MS SQLServer, because in the Oracle documentation suggest that is possible but not "how do it", except the use of heterogeneous services.
    Thanks in advance.
    D.

  • Date/Time erros when working with Database Connectivity toolkit

    Hi!,
    We are observing errors with date/time when working with LV. The error occurs when the system datetime format is set such that day precedes month (e.g. dd/mm/yyyy). Our VI uses LV 7.1, Database Connectivity 1.0 and SQL Server 2000 on a Win2000 machine.
    Problem details
    Our database in SQL server has a table having columns with data type "datetime"
    If the system date format (as set in control panel) is "mm/dd/yyyy", the 'insert into database' vi works fine. This function inserts the date and time (among other things) into the above mentioned table.
    However, when the system datetime is set to dd/mm/yyyy we start receiving error that date and time is beyond range for dates in which the date had the day field greater than 12 (e.g. 23/10/2005). With the same settings, if the date is such that day field is equal or less than 12 (e.g. 03/10/2005), we do not receive an error but the date is interpreted as 10 March 2005 rather than 03 September 2005.
    Clearly LV (or is it SQL) is mistaking the day field as month.
    We have taken care that when sending and receiving date, the format date and time string is set as per system settings.
    Thus, if system setting is "dd/mm/yyyy" our format string is "%d/%m/%Y"
    And if the setting is "mm/dd/yyyy" our format string is"%m/%d/%Y"
    Any help on problem cause and cure is welcome.
    Thanks,
    Gurdas
    Gurdas Singh
    PhD. Candidate | Civil Engineering | NCSU.edu

    Hi Xu,
    You answer led me to some very interesting fact finding on how SQL server handles date and time. I have attached a zip file which contains webpages that throw more light on this issue.
    The attached pages tell me that SQL has an inbuilt date/time reference format. The default in mm/dd/yyyy. Which explains why my VI worked when I used that format to write to SQL.
    However there is a catch:
    SQL expects the date/time to be in its inbuilt reference format when you WRITE data to SQL. If the date/time is in a different format, better tell SQL about it by using say the SET command you mentioned.
    BUT what about the date/time format when you are reading data from SQL?
    Our finding is that SQL sends date/time string in the system date format when you READ from SQL !!! That is very surprising behaviour (why differentiate between write and read?).
    Is our finding correct?
    So, we adopted the following simple strategy (yet to be fully tested):
    1) Whenever we write date/time to SQL, the string is formatted as mm/dd/yyyy. Presently, the user's SQL server is in the default state. Caveat is that if the user changes SQL date/time from default (which is mm/dd/yyyy) to anything else, our software will give errors. But then he changed it  ;-)
    2) When we read date/time from SQL we format the string as per system date/time format.
    I know this is not very robust coding. But assuming the user keeps his SQL in the current setting, should we expect smooth working?
    In other words, are there any errors and/or flaws in our strategy?
    Thanks,
    Gurdas
    Gurdas Singh
    PhD. Candidate | Civil Engineering | NCSU.edu

  • Where to find goods receipt data only working with GR in tcode me23n

    hi,
    I am getting this error 1. Enter Good receipt data only when working with GR-based IV. What can be done for this. how to rectify this error.
    Where can i find the goods receipt data in the transaction Me23n.

    in addtion to above process ,
    u can check @ table level EKBE w.r.f PO number.
    VGABE = 1     Goods receipt
            2     Invoice receipt
    and let us know what u are doing in ME23N.
    FOR GR Tcode is MIGO
    for IN tcode is MIRO.
    Regards
    Prabhu

Maybe you are looking for

  • Screen Freeze from MacBook Pro to MacBook

    When using Face time from my 2008 era mac book pro to a basic mac book of the same vintage, the screen freezes and the app bombs on the mac book. Is this a memory problem. No problem going from an iphone 4 to the mac book. Is it the mac book pro or t

  • Enable Commenting on Interactive Form

    Hello, I am a bit of a newbie in javascript programming but I have been using Livecycle to design basic forms.  On the basic forms I created, I had no problem allowing the user to attach a file. Just recently, I created a dynamic interactive form tha

  • SCCM 2012 Reporting point server instance blank

    I have installed SCCM 2012 With remote SQL database server successfully, at the time of Reporting service point role installation, its verified the SCCm database successfully but SQL server service instance is blank, what would be the reason.... Belo

  • Apple Script

    I have been using the following apple Script in a home control program for the last 12 years and it has worked great if (status of "Porch Lights, Front") is false and (daylight) is false then           turnon ("Porch Lights, Front") for 5 * minutes e

  • Having a image alignment problem using clearbox

    Hi, I'm having an image alignment problem. I cannot figure it out. I'm using the clearbox - lightbox dreamweaver widget. Using Dreamweaver CS6. Actual page located here. Any help would be appreciated. http://dirtysouthink.com/gallery/dustin2.html