You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by sixmen <gi...@git.apache.org> on 2016/06/21 03:30:02 UTC

[GitHub] zeppelin issue #1055: [ZEPPELIN-1028] Fix exported notebook importing error

Github user sixmen commented on the issue:

    https://github.com/apache/zeppelin/pull/1055
  
    Times in the web interface will show UTC times instead of local times if this patch is applied.
    
    Before applying this patch,
    <img width="372" alt="2016-06-21 12 06 33" src="https://cloud.githubusercontent.com/assets/1409279/16216867/5f5cc2b8-37a9-11e6-81fe-80e92878bdb8.png">
    
    After applying this patch, (I'm at Seoul(+09:00))
    <img width="360" alt="2016-06-21 12 01 31" src="https://cloud.githubusercontent.com/assets/1409279/16216874/6e2ae766-37a9-11e6-9c44-9e7133bc614d.png">
    
    I think there are two ways to solve this problem.
    
    First, export a date as natural format (like Jun 21, 2016 2:28:24 AM), and convert UTC to local in web interface.
    
    ( modify ```moment(pdata.dateUpdated).format('MMMM DD YYYY, h:mm:ss A')``` to ```moment.utc(pdata.dateUpdated).local().format('MMMM DD YYYY, h:mm:ss A')``` )
    
    Second, export a date as ISO 8601, and modify importing code.
    
    ( modify zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/Notebook.java#importNode 's GsonBuilder to recognize ISO 8601 & natural format )
    
    
    The second must be support two format (ISO 8601 for exported notebooks from new app and natural format for exported notebooks from old app), so I think first solution is simpler.
    But I think standard format(ISO 8601) is preferable for interchange format.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---